diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2018-06-11 23:26:06 +0300 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2018-06-11 23:26:06 +0300 |
commit | 88b22033b0295a233e09107c2ccd18e66a06599a (patch) | |
tree | 36e9f8ad4270f8af7ff4e8420e47e8dc4abfa2a7 /spec/workers/repository_fork_worker_spec.rb | |
parent | c0efed0199c899570ed7f825406e59a812e151ed (diff) | |
parent | 128b3a89a576b25fd8939ca1390b77eff031251a (diff) |
Merge branch '11-0-stable-prepare-rc9' into '11-0-stable'
Prepare 11.0 RC9 release
See merge request gitlab-org/gitlab-ce!19642
Diffstat (limited to 'spec/workers/repository_fork_worker_spec.rb')
-rw-r--r-- | spec/workers/repository_fork_worker_spec.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/workers/repository_fork_worker_spec.rb b/spec/workers/repository_fork_worker_spec.rb index 4b3c1736ea0..ae4786389c7 100644 --- a/spec/workers/repository_fork_worker_spec.rb +++ b/spec/workers/repository_fork_worker_spec.rb @@ -55,10 +55,15 @@ describe RepositoryForkWorker do it 'flushes various caches' do expect_fork_repository.and_return(true) - expect_any_instance_of(Repository).to receive(:expire_emptiness_caches) + # Works around https://github.com/rspec/rspec-mocks/issues/910 + expect(Project).to receive(:find).with(fork_project.id).and_return(fork_project) + expect(fork_project.repository).to receive(:expire_emptiness_caches) .and_call_original - - expect_any_instance_of(Repository).to receive(:expire_exists_cache) + expect(fork_project.repository).to receive(:expire_exists_cache) + .and_call_original + expect(fork_project.wiki.repository).to receive(:expire_emptiness_caches) + .and_call_original + expect(fork_project.wiki.repository).to receive(:expire_exists_cache) .and_call_original perform! |