From 7307bfada6085d87399767b2ccf789d124b6af5e Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Wed, 23 Feb 2022 21:12:24 +0100 Subject: [PATCH] DEV: Remove the migration specs (#295) They're no longer useful --- ...ents_from_custom_fields_to_a_table_spec.rb | 40 ------------------- 1 file changed, 40 deletions(-) delete mode 100644 spec/db/post_migrate/20210714173022_correctly_move_assignments_from_custom_fields_to_a_table_spec.rb diff --git a/spec/db/post_migrate/20210714173022_correctly_move_assignments_from_custom_fields_to_a_table_spec.rb b/spec/db/post_migrate/20210714173022_correctly_move_assignments_from_custom_fields_to_a_table_spec.rb deleted file mode 100644 index b8d7279..0000000 --- a/spec/db/post_migrate/20210714173022_correctly_move_assignments_from_custom_fields_to_a_table_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -require "rails_helper" -require_relative "../../../db/post_migrate/20210714173022_correctly_move_assignments_from_custom_fields_to_a_table" - -describe CorrectlyMoveAssignmentsFromCustomFieldsToATable do - context "valid data" do - # TODO: remove all these specs since they're invalid with the updated schema? - skip "should migrate the data correctly" do - TopicCustomField.create!(topic_id: 99, name: "assigned_to_id", value: "50") - TopicCustomField.create!(topic_id: 99, name: "assigned_by_id", value: "60") - silence_stdout { CorrectlyMoveAssignmentsFromCustomFieldsToATable.new.up } - - assignment = Assignment.first - expect(assignment.topic_id).to eq(99) - expect(assignment.assigned_to_id).to eq(50) - expect(assignment.assigned_by_user_id).to eq(60) - expect(assignment.target_id).to eq(99) - expect(assignment.target_type).to eq('Topic') - end - end - - context "no assigned_by data" do - it "should migrate the data correctly" do - TopicCustomField.create!(topic_id: 99, name: "assigned_to_id", value: "50") - silence_stdout { CorrectlyMoveAssignmentsFromCustomFieldsToATable.new.up } - - expect(Assignment.count).to eq(0) - end - end - - context "no assigned_to data" do - it "should migrate the data correctly" do - TopicCustomField.create!(topic_id: 99, name: "assigned_by_id", value: "60") - silence_stdout { CorrectlyMoveAssignmentsFromCustomFieldsToATable.new.up } - - expect(Assignment.count).to eq(0) - end - end -end