A platform for community discussion. Free, open, simple.
DEV: Fix upcoming_changes/track specs (#40073)
Jarek Radosze21cb93ee2b2
diff --git a/spec/services/upcoming_changes/track_spec.rb b/spec/services/upcoming_changes/track_spec.rbindex d79d8a69503..73951a963e3 100644--- a/spec/services/upcoming_changes/track_spec.rb+++ b/spec/services/upcoming_changes/track_spec.rb@@ -4,10 +4,8 @@ RSpec.describe UpcomingChanges::Track dofab!(:admin_1, :admin)fab!(:admin_2, :admin)- let(:all_admins) { [admin_1, admin_2] }-describe ".call" do- subject(:result) { described_class.call(all_admins:) }+ subject(:result) { described_class.call }let(:added_changes_result) do{ added_changes: [:added_change], notified_changes: [:notified_added] }@@ -37,9 +35,9 @@ RSpec.describe UpcomingChanges::Track doit "calls TrackNotifyAddedChanges with correct arguments" doresult- expect(UpcomingChanges::Action::TrackNotifyAddedChanges).to have_received(:call).with(- all_admins:,- )+ expect(UpcomingChanges::Action::TrackNotifyAddedChanges).to have_received(:call) do |args|+ expect(args[:all_admins]).to contain_exactly(admin_1, admin_2)+ endendit "calls TrackRemovedChanges" do@@ -49,11 +47,11 @@ RSpec.describe UpcomingChanges::Track doit "calls TrackNotifyStatusChanges with correct arguments" doresult- expect(UpcomingChanges::Action::TrackNotifyStatusChanges).to have_received(:call).with(- all_admins:,- added_changes: [:added_change],- removed_changes: [:removed_change],- )+ expect(UpcomingChanges::Action::TrackNotifyStatusChanges).to have_received(:call) do |args|+ expect(args[:all_admins]).to contain_exactly(admin_1, admin_2)+ expect(args[:added_changes]).to eq([:added_change])+ expect(args[:removed_changes]).to eq([:removed_change])+ endendit "populates the context with results from actions" do