Commit 072f9224 authored by Stan Hu's avatar Stan Hu

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`.
parent fa1a75ae
......@@ -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)
......
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