Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
jorg-vr committed Nov 10, 2023
1 parent e600ffb commit a29e6e6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/jobs/remove_activities_job_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,13 @@ class RemoveActivitiesJobTest < ActiveJob::TestCase
RemoveActivitiesJob.perform_now
end
end

test 'should not remove activities that are part of an evaluation' do
e = create :exercise, status: :removed, draft: false, updated_at: 2.months.ago
create :evaluation_exercise, exercise: e

assert_no_difference 'Exercise.count' do
RemoveActivitiesJob.perform_now
end
end
end

0 comments on commit a29e6e6

Please sign in to comment.