Browse Source

Fix flaky test, check regardless of order

pull/3040/head
Manny Dinssa 1 month ago
parent
commit
2ddcc019e2
  1. 2
      spec/jobs/process_merge_request_job_spec.rb

2
spec/jobs/process_merge_request_job_spec.rb

@ -31,7 +31,7 @@ describe ProcessMergeRequestJob do
let(:merge_request) { MergeRequest.create!(requesting_organisation: organisation, absorbing_organisation: organisation, merge_date: Time.zone.local(2022, 3, 3), existing_absorbing_organisation: false) }
it "calls the merge organisations service with correct arguments" do
expect(Merge::MergeOrganisationsService).to receive(:new).with(absorbing_organisation_id: organisation.id, merging_organisation_ids: [merging_organisation.id, other_merging_organisation.id], merge_date: Time.zone.local(2022, 3, 3), absorbing_organisation_active_from_merge_date: true)
expect(Merge::MergeOrganisationsService).to receive(:new).with(absorbing_organisation_id: organisation.id, merging_organisation_ids: match_array([merging_organisation.id, other_merging_organisation.id]), merge_date: Time.zone.local(2022, 3, 3), absorbing_organisation_active_from_merge_date: true)
job.perform(merge_request:)
expect(merge_request.reload.status).to eq("request_merged")

Loading…
Cancel
Save