Commit de43719e authored by Douwe Maan's avatar Douwe Maan

Use wiki_repo trait on two more project factories

parent b1c393eb
...@@ -2,7 +2,7 @@ require 'spec_helper' ...@@ -2,7 +2,7 @@ require 'spec_helper'
describe 'Project elastic search', :js, :elastic do describe 'Project elastic search', :js, :elastic do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :repository, namespace: user.namespace) } let(:project) { create(:project, :repository, :wiki_repo, namespace: user.namespace) }
before do before do
stub_ee_application_setting(elasticsearch_search: true, elasticsearch_indexing: true) stub_ee_application_setting(elasticsearch_search: true, elasticsearch_indexing: true)
......
...@@ -13,8 +13,8 @@ describe Gitlab::Elastic::SearchResults do ...@@ -13,8 +13,8 @@ describe Gitlab::Elastic::SearchResults do
end end
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project_1) { create(:project, :repository) } let(:project_1) { create(:project, :repository, :wiki_repo) }
let(:project_2) { create(:project, :repository) } let(:project_2) { create(:project, :repository, :wiki_repo) }
let(:limit_project_ids) { [project_1.id] } let(:limit_project_ids) { [project_1.id] }
describe 'parse_search_result' do describe 'parse_search_result' do
...@@ -559,7 +559,7 @@ describe Gitlab::Elastic::SearchResults do ...@@ -559,7 +559,7 @@ describe Gitlab::Elastic::SearchResults do
end end
it 'finds wiki blobs from public projects only' do it 'finds wiki blobs from public projects only' do
project_2 = create :project, :repository, :private project_2 = create :project, :repository, :private, :wiki_repo
project_2.wiki.create_page('index_page', 'term') project_2.wiki.create_page('index_page', 'term')
project_2.wiki.index_blobs project_2.wiki.index_blobs
Gitlab::Elastic::Helper.refresh_index Gitlab::Elastic::Helper.refresh_index
...@@ -644,10 +644,10 @@ describe Gitlab::Elastic::SearchResults do ...@@ -644,10 +644,10 @@ describe Gitlab::Elastic::SearchResults do
end end
describe 'Visibility levels' do describe 'Visibility levels' do
let(:internal_project) { create(:project, :internal, :repository, description: "Internal project") } let(:internal_project) { create(:project, :internal, :repository, :wiki_repo, description: "Internal project") }
let(:private_project1) { create(:project, :private, :repository, description: "Private project") } let(:private_project1) { create(:project, :private, :repository, :wiki_repo, description: "Private project") }
let(:private_project2) { create(:project, :private, :repository, description: "Private project where I'm a member") } let(:private_project2) { create(:project, :private, :repository, :wiki_repo, description: "Private project where I'm a member") }
let(:public_project) { create(:project, :public, :repository, description: "Public project") } let(:public_project) { create(:project, :public, :repository, :wiki_repo, description: "Public project") }
let(:limit_project_ids) { [private_project2.id] } let(:limit_project_ids) { [private_project2.id] }
before do before do
......
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