Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-06-11 22:06:25 +0300
committerStan Hu <stanhu@gmail.com>2018-06-11 22:06:25 +0300
commit072f9224afded08cb1c93fa0e6c077928f60cca0 (patch)
tree90cf899ba7690d34717ad7527b1ad258e6596ec1 /spec/models/project_spec.rb
parentfa1a75ae28b421c5d3bd926c2795a053e4c6af15 (diff)
Relax expectation in spec/models/project_spec.rb
Multiple Sidekiq workers can run in the spec, causing `Project.find` to be run in different places. Instead of setting a fixed number of calls, just use `allow`.
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r--spec/models/project_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index a7a6d0bb09c..926365e409a 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -1734,7 +1734,7 @@ describe Project do
.and_return(true)
# Works around https://github.com/rspec/rspec-mocks/issues/910
- expect(described_class).to receive(:find).with(project.id).twice.and_return(project)
+ allow(described_class).to receive(:find).with(project.id).and_return(project)
expect(project.repository).to receive(:after_import)
.and_call_original
expect(project.wiki.repository).to receive(:after_import)