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:
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r--spec/models/project_spec.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 6c90a1b5614..9b1c724f0c2 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -1791,21 +1791,19 @@ describe Project do
let(:project) { create(:project, :repository) }
let(:repo) { double(:repo, exists?: true) }
let(:wiki) { double(:wiki, exists?: true) }
- let(:design) { double(:wiki, exists?: false) }
it 'expires the caches of the repository and wiki' do
+ # In EE, there are design repositories as well
+ allow(Repository).to receive(:new).and_call_original
+
allow(Repository).to receive(:new)
- .with('foo', project)
+ .with('foo', project, shard: project.repository_storage)
.and_return(repo)
allow(Repository).to receive(:new)
- .with('foo.wiki', project)
+ .with('foo.wiki', project, shard: project.repository_storage, repo_type: Gitlab::GlRepository::WIKI)
.and_return(wiki)
- allow(Repository).to receive(:new)
- .with('foo.design', project)
- .and_return(design)
-
expect(repo).to receive(:before_delete)
expect(wiki).to receive(:before_delete)