Skip to content

Commit

Permalink
test: fix upload requirement checks to watch for json
Browse files Browse the repository at this point in the history
  • Loading branch information
macite committed Jun 25, 2024
1 parent fc1bcfd commit 2e96f7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/models/task_definition_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,14 @@ def test_export_task_definitions_csv
task_defs_csv = CSV.parse unit.task_definitions_csv, headers: true
task_defs_csv.each do |task_def_csv|
task_def = unit.task_definitions.find_by(abbreviation: task_def_csv['abbreviation'])
keys_to_ignore = ['tutorial_stream', 'start_week', 'start_day', 'target_week', 'target_day', 'due_week', 'due_day']
keys_to_ignore = ['tutorial_stream', 'start_week', 'start_day', 'target_week', 'target_day', 'due_week', 'due_day', 'upload_requirements']
task_def_csv.each do |key, value|
unless keys_to_ignore.include?(key)
assert_equal(task_def[key].to_s, value)
end
end

assert_equal task_def.upload_requirements.to_json, task_def_csv['upload_requirements']
assert_equal task_def.start_week.to_s, task_def_csv['start_week']
assert_equal task_def.start_day.to_s, task_def_csv['start_day']
assert_equal task_def.target_week.to_s, task_def_csv['target_week']
Expand Down

0 comments on commit 2e96f7b

Please sign in to comment.