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/support/shared_examples')
-rw-r--r--spec/support/shared_examples/features/wiki/user_creates_wiki_page_shared_examples.rb8
-rw-r--r--spec/support/shared_examples/features/wiki/user_views_wiki_page_shared_examples.rb4
-rw-r--r--spec/support/shared_examples/initializers/uses_gitlab_url_blocker_shared_examples.rb2
-rw-r--r--spec/support/shared_examples/namespaces/traversal_examples.rb8
4 files changed, 15 insertions, 7 deletions
diff --git a/spec/support/shared_examples/features/wiki/user_creates_wiki_page_shared_examples.rb b/spec/support/shared_examples/features/wiki/user_creates_wiki_page_shared_examples.rb
index dfad11f3170..6280a61f024 100644
--- a/spec/support/shared_examples/features/wiki/user_creates_wiki_page_shared_examples.rb
+++ b/spec/support/shared_examples/features/wiki/user_creates_wiki_page_shared_examples.rb
@@ -44,7 +44,7 @@ RSpec.shared_examples 'User creates wiki page' do
click_link("link test")
- expect(page).to have_content("Create New Page")
+ expect(page).to have_content("New Page")
end
it "shows non-escaped link in the pages list", :js do
@@ -85,7 +85,7 @@ RSpec.shared_examples 'User creates wiki page' do
expect(page).to have_current_path(wiki_page_path(wiki, "test"), ignore_query: true)
page.within(:css, ".wiki-page-header") do
- expect(page).to have_content("Create New Page")
+ expect(page).to have_content("New Page")
end
click_link("Home")
@@ -97,7 +97,7 @@ RSpec.shared_examples 'User creates wiki page' do
expect(page).to have_current_path(wiki_page_path(wiki, "api"), ignore_query: true)
page.within(:css, ".wiki-page-header") do
- expect(page).to have_content("Create")
+ expect(page).to have_content("New Page")
end
click_link("Home")
@@ -109,7 +109,7 @@ RSpec.shared_examples 'User creates wiki page' do
expect(page).to have_current_path(wiki_page_path(wiki, "raketasks"), ignore_query: true)
page.within(:css, ".wiki-page-header") do
- expect(page).to have_content("Create")
+ expect(page).to have_content("New Page")
end
end
diff --git a/spec/support/shared_examples/features/wiki/user_views_wiki_page_shared_examples.rb b/spec/support/shared_examples/features/wiki/user_views_wiki_page_shared_examples.rb
index c6454f62f34..7c7a6942155 100644
--- a/spec/support/shared_examples/features/wiki/user_views_wiki_page_shared_examples.rb
+++ b/spec/support/shared_examples/features/wiki/user_views_wiki_page_shared_examples.rb
@@ -117,7 +117,7 @@ RSpec.shared_examples 'User views a wiki page' do
click_on('image')
expect(page).to have_current_path(%r{wikis/#{path}})
- expect(page).to have_content('Create New Page')
+ expect(page).to have_content('New Page')
end
end
@@ -281,6 +281,6 @@ RSpec.shared_examples 'User views a wiki page' do
click_link "Create your first page"
- expect(page).to have_content('Create New Page')
+ expect(page).to have_content('New Page')
end
end
diff --git a/spec/support/shared_examples/initializers/uses_gitlab_url_blocker_shared_examples.rb b/spec/support/shared_examples/initializers/uses_gitlab_url_blocker_shared_examples.rb
index 3119a03b1cb..3d8ffd4fae2 100644
--- a/spec/support/shared_examples/initializers/uses_gitlab_url_blocker_shared_examples.rb
+++ b/spec/support/shared_examples/initializers/uses_gitlab_url_blocker_shared_examples.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-RSpec.shared_examples 'a request using Gitlab::UrlBlocker' do
+RSpec.shared_examples 'a request using Gitlab::HTTP_V2::UrlBlocker' do
# Written to test internal patches against 3rd party libraries
#
# Expects the following to be available in the example contexts:
diff --git a/spec/support/shared_examples/namespaces/traversal_examples.rb b/spec/support/shared_examples/namespaces/traversal_examples.rb
index 960160395f8..65f1abe0355 100644
--- a/spec/support/shared_examples/namespaces/traversal_examples.rb
+++ b/spec/support/shared_examples/namespaces/traversal_examples.rb
@@ -284,6 +284,14 @@ RSpec.shared_examples 'namespace traversal' do
end
end
+ describe 'all_project_ids' do
+ it 'is a AR relation' do
+ expect(group.all_project_ids).to be_kind_of(ActiveRecord::Relation)
+ end
+
+ it_behaves_like 'recursive version', :all_project_ids
+ end
+
describe '#self_and_descendant_ids' do
subject { group.self_and_descendant_ids.pluck(:id) }