Remove unnecessary `and_return calls` on daemon spec

parent 251821ba
...@@ -4,7 +4,7 @@ describe Gitlab::Geo::LogCursor::Daemon, :postgresql do ...@@ -4,7 +4,7 @@ describe Gitlab::Geo::LogCursor::Daemon, :postgresql do
include ::EE::GeoHelpers include ::EE::GeoHelpers
describe '#run!' do describe '#run!' do
set(:geo_node) { create(:geo_node) } set(:geo_node) { create(:geo_node, :primary) }
before do before do
stub_current_geo_node(geo_node) stub_current_geo_node(geo_node)
...@@ -63,7 +63,7 @@ describe Gitlab::Geo::LogCursor::Daemon, :postgresql do ...@@ -63,7 +63,7 @@ describe Gitlab::Geo::LogCursor::Daemon, :postgresql do
it 'performs Geo::ProjectSyncWorker' do it 'performs Geo::ProjectSyncWorker' do
expect(Geo::ProjectSyncWorker).to receive(:perform_async) expect(Geo::ProjectSyncWorker).to receive(:perform_async)
.with(project.id, anything).once.and_return(spy) .with(project.id, anything).once
subject.run! subject.run!
end end
...@@ -103,7 +103,7 @@ describe Gitlab::Geo::LogCursor::Daemon, :postgresql do ...@@ -103,7 +103,7 @@ describe Gitlab::Geo::LogCursor::Daemon, :postgresql do
it 'performs Geo::ProjectSyncWorker' do it 'performs Geo::ProjectSyncWorker' do
expect(Geo::ProjectSyncWorker).to receive(:perform_async) expect(Geo::ProjectSyncWorker).to receive(:perform_async)
.with(project.id, anything).once.and_return(spy) .with(project.id, anything).once
subject.run! subject.run!
end end
...@@ -171,7 +171,7 @@ describe Gitlab::Geo::LogCursor::Daemon, :postgresql do ...@@ -171,7 +171,7 @@ describe Gitlab::Geo::LogCursor::Daemon, :postgresql do
before do before do
allow(subject).to receive(:exit?).and_return(false, true) allow(subject).to receive(:exit?).and_return(false, true)
allow(Geo::ProjectSyncWorker).to receive(:perform_async).and_return(spy) allow(Geo::ProjectSyncWorker).to receive(:perform_async)
end end
it 'replays events for projects that belong to selected namespaces to replicate' do it 'replays events for projects that belong to selected namespaces to replicate' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment