diff --git a/lib/cdc_migration_testing/fixtures/assignment_override.rb b/lib/cdc_migration_testing/fixtures/assignment_override.rb index 0dad6767996..c6b3a84da44 100644 --- a/lib/cdc_migration_testing/fixtures/assignment_override.rb +++ b/lib/cdc_migration_testing/fixtures/assignment_override.rb @@ -17,12 +17,18 @@ # module CdcFixtures + class ForeignKeyNotSatisfied < StandardError + end + def self.create_assignment_override + assignment = Assignment.first + raise CdcFixtures::ForeignKeyNotSatisfied unless assignment + AssignmentOverride.new({ workflow_state: 'default', title: 'default', set_id: 1, - assignment_id: 1 + assignment_id: assignment.id }) end end