fix : remove test including previous association

This commit is contained in:
Eric Leroy-Terquem 2024-03-22 11:29:14 +01:00
parent 5e36ac54b4
commit 60f7e02429
2 changed files with 0 additions and 24 deletions

View file

@ -703,7 +703,6 @@ describe Instructeurs::ProceduresController, type: :controller do
it "creates a Bulk Message for 2 groupes instructeurs" do
expect(BulkMessage.count).to eq(1)
expect(bulk_message.body).to eq("avant\napres")
expect(bulk_message.groupe_instructeurs).to be_empty
expect(bulk_message.procedure_id).to eq(procedure.id)
end

View file

@ -1,23 +0,0 @@
# frozen_string_literal: true
require "rails_helper"
module Maintenance
RSpec.describe BackfillBulkMessagesWithProcedureIdTask do
describe "#process" do
subject(:process) { described_class.process(bulk_message) }
context 'with groupe instructeurs but no procedure_id' do
let(:bulk_message) { create(:bulk_message) }
let(:procedure) { bulk_message.groupe_instructeurs.first.procedure }
before { bulk_message.update_column(:procedure_id, nil) }
it 'fills procedure id' do
subject
expect(bulk_message.procedure_id).to eq procedure.id
end
end
end
end
end