Commit d5c9aaad authored by Douwe Maan's avatar Douwe Maan

Use wiki_repo trait on project factory when wiki is used

parent 66123d44
...@@ -26,7 +26,7 @@ describe 'GlobalSearch' do ...@@ -26,7 +26,7 @@ describe 'GlobalSearch' do
context "Respect feature visibility levels" do context "Respect feature visibility levels" do
context "Private projects" do context "Private projects" do
let(:project) { create(:project, :private, :repository) } let(:project) { create(:project, :private, :repository, :wiki_repo) }
# The feature can be disabled but the data may actually exist # The feature can be disabled but the data may actually exist
it "does not find items if features are disabled" do it "does not find items if features are disabled" do
...@@ -57,7 +57,7 @@ describe 'GlobalSearch' do ...@@ -57,7 +57,7 @@ describe 'GlobalSearch' do
end end
context "Internal projects" do context "Internal projects" do
let(:project) { create(:project, :internal, :repository) } let(:project) { create(:project, :internal, :repository, :wiki_repo) }
# The feature can be disabled but the data may actually exist # The feature can be disabled but the data may actually exist
it "does not find items if features are disabled" do it "does not find items if features are disabled" do
...@@ -101,7 +101,7 @@ describe 'GlobalSearch' do ...@@ -101,7 +101,7 @@ describe 'GlobalSearch' do
end end
context "Public projects" do context "Public projects" do
let(:project) { create(:project, :public, :repository) } let(:project) { create(:project, :public, :repository, :wiki_repo) }
# The feature can be disabled but the data may actually exist # The feature can be disabled but the data may actually exist
it "does not find items if features are disabled" do it "does not find items if features are disabled" do
......
...@@ -2,7 +2,7 @@ require 'spec_helper' ...@@ -2,7 +2,7 @@ require 'spec_helper'
feature 'Global elastic search' do feature 'Global elastic search' 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)
......
...@@ -3,7 +3,7 @@ require 'spec_helper' ...@@ -3,7 +3,7 @@ require 'spec_helper'
feature 'Group elastic search', :js do feature 'Group elastic search', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group) } let(:group) { create(:group) }
let(:project) { create(:project, :repository, namespace: group) } let(:project) { create(:project, :repository, :wiki_repo, namespace: group) }
def choose_group(group) def choose_group(group)
find('.js-search-group-dropdown').click find('.js-search-group-dropdown').click
......
...@@ -6,7 +6,7 @@ describe ProjectWiki, :elastic do ...@@ -6,7 +6,7 @@ describe ProjectWiki, :elastic do
end end
it "searches wiki page" do it "searches wiki page" do
project = create :project project = create :project, :wiki_repo
Sidekiq::Testing.inline! do Sidekiq::Testing.inline! do
project.wiki.create_page("index_page", "Bla bla term1") project.wiki.create_page("index_page", "Bla bla term1")
......
...@@ -3,7 +3,7 @@ require 'spec_helper' ...@@ -3,7 +3,7 @@ require 'spec_helper'
describe API::Search do describe API::Search do
set(:user) { create(:user) } set(:user) { create(:user) }
set(:group) { create(:group) } set(:group) { create(:group) }
let(:project) { create(:project, :public, name: 'awesome project', group: group) } let(:project) { create(:project, :public, :wiki_repo, name: 'awesome project', group: group) }
let(:repo_project) { create(:project, :public, :repository, group: group) } let(:repo_project) { create(:project, :public, :repository, group: group) }
shared_examples 'response is correct' do |schema:, size: 1| shared_examples 'response is correct' do |schema:, size: 1|
......
require 'spec_helper' require 'spec_helper'
describe WikiPages::CreateService do describe WikiPages::CreateService do
let(:project) { create(:project) } let(:project) { create(:project, :wiki_repo) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:opts) do let(:opts) 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