Skip to content

Commit 996d6cd

Browse files
committed
test: check unit archive defaults to false
1 parent ac2f9c1 commit 996d6cd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/models/unit_model_test.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,8 @@ def test_archive_unit
876876
end
877877

878878
def test_archive_unit_job
879+
assert_not Doubtfire::Application.config.archive_units, 'Archive units should be off by default'
880+
879881
unit = FactoryBot.create :unit, with_students: false, task_count: 0
880882

881883
unit.end_date = Time.zone.now - Doubtfire::Application.config.unit_archive_after_period - 1.day
@@ -886,8 +888,10 @@ def test_archive_unit_job
886888

887889
assert_not unit.archived
888890
assert_not unit2.archived
891+
889892
job = ArchiveOldUnitsJob.new
890893
job.perform
894+
891895
unit.reload
892896
unit2.reload
893897

0 commit comments

Comments
 (0)