diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-13 12:05:06 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-13 12:08:03 +0200 |
commit | beffbc8aa2845d7a2859c269fd2c891cddb308e6 (patch) | |
tree | 0c9472dfed0e7cd2b73f02fd1d70211a1c02cdbc /spec | |
parent | 433b6d2c65f0018fa67e2d8905d1cba75e7990fa (diff) | |
download | gitlab-ce-beffbc8aa2845d7a2859c269fd2c891cddb308e6.tar.gz |
Fix mocks in background migrations specs
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/background_migration_spec.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/lib/gitlab/background_migration_spec.rb b/spec/lib/gitlab/background_migration_spec.rb index 55bf7040ef3..2f3e7aba1f4 100644 --- a/spec/lib/gitlab/background_migration_spec.rb +++ b/spec/lib/gitlab/background_migration_spec.rb @@ -10,12 +10,16 @@ describe Gitlab::BackgroundMigration do describe '.steal' do context 'when there are enqueued jobs present' do - let(:queue) { [double(:job, args: ['Foo', [10, 20]])] } + let(:job) { double(:job, args: ['Foo', [10, 20]]) } + let(:queue) { [job] } before do allow(Sidekiq::Queue).to receive(:new) .with(described_class.queue) .and_return(queue) + + allow(job).to receive(:queue) + .and_return(described_class.queue) end it 'steals jobs from a queue' do |