diff options
Diffstat (limited to 'spec/migrations/remove_alerts_service_records_spec.rb')
-rw-r--r-- | spec/migrations/remove_alerts_service_records_spec.rb | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/spec/migrations/remove_alerts_service_records_spec.rb b/spec/migrations/remove_alerts_service_records_spec.rb deleted file mode 100644 index 83f440f8e17..00000000000 --- a/spec/migrations/remove_alerts_service_records_spec.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe RemoveAlertsServiceRecords do - let(:services) { table(:services) } - let(:alerts_service_data) { table(:alerts_service_data) } - - before do - 5.times do - service = services.create!(type: 'AlertsService') - alerts_service_data.create!(service_id: service.id) - end - - services.create!(type: 'SomeOtherType') - end - - it 'removes services records of type AlertsService and corresponding data', :aggregate_failures do - expect(services.count).to eq(6) - expect(alerts_service_data.count).to eq(5) - - migrate! - - expect(services.count).to eq(1) - expect(services.first.type).to eq('SomeOtherType') - expect(services.where(type: 'AlertsService')).to be_empty - expect(alerts_service_data.all).to be_empty - end -end |