diff options
Diffstat (limited to 'spec/features/explore/groups_spec.rb')
-rw-r--r-- | spec/features/explore/groups_spec.rb | 44 |
1 files changed, 28 insertions, 16 deletions
diff --git a/spec/features/explore/groups_spec.rb b/spec/features/explore/groups_spec.rb index 458f83dffb4..57a7e8ea523 100644 --- a/spec/features/explore/groups_spec.rb +++ b/spec/features/explore/groups_spec.rb @@ -29,8 +29,8 @@ RSpec.describe 'Explore Groups', :js, feature_category: :subgroups do shared_examples 'renders public and internal projects' do it do visit_page - expect(page).to have_content(public_project.name) - expect(page).to have_content(internal_project.name) + expect(page).to have_content(public_project.name).or(have_content(public_project.path)) + expect(page).to have_content(internal_project.name).or(have_content(internal_project.path)) expect(page).not_to have_content(private_project.name) end end @@ -38,7 +38,7 @@ RSpec.describe 'Explore Groups', :js, feature_category: :subgroups do shared_examples 'renders only public project' do it do visit_page - expect(page).to have_content(public_project.name) + expect(page).to have_content(public_project.name).or(have_content(public_project.path)) expect(page).not_to have_content(internal_project.name) expect(page).not_to have_content(private_project.name) end @@ -47,7 +47,7 @@ RSpec.describe 'Explore Groups', :js, feature_category: :subgroups do shared_examples 'renders group in public groups area' do it do visit explore_groups_path - expect(page).to have_content(group.name) + expect(page).to have_content(group.path) end end @@ -56,32 +56,44 @@ RSpec.describe 'Explore Groups', :js, feature_category: :subgroups do sign_in(user) end - it_behaves_like 'renders public and internal projects' do - subject(:visit_page) { visit group_path(group) } + context 'for group_path' do + it_behaves_like 'renders public and internal projects' do + subject(:visit_page) { visit group_path(group) } + end end - it_behaves_like 'renders public and internal projects' do - subject(:visit_page) { visit issues_group_path(group) } + context 'for issues_group_path' do + it_behaves_like 'renders public and internal projects' do + subject(:visit_page) { visit issues_group_path(group) } + end end - it_behaves_like 'renders public and internal projects' do - subject(:visit_page) { visit merge_requests_group_path(group) } + context 'for merge_requests_group_path' do + it_behaves_like 'renders public and internal projects' do + subject(:visit_page) { visit merge_requests_group_path(group) } + end end it_behaves_like 'renders group in public groups area' end context 'when signed out' do - it_behaves_like 'renders only public project' do - subject(:visit_page) { visit group_path(group) } + context 'for group_path' do + it_behaves_like 'renders only public project' do + subject(:visit_page) { visit group_path(group) } + end end - it_behaves_like 'renders only public project' do - subject(:visit_page) { visit issues_group_path(group) } + context 'for issues_group_path' do + it_behaves_like 'renders only public project' do + subject(:visit_page) { visit issues_group_path(group) } + end end - it_behaves_like 'renders only public project' do - subject(:visit_page) { visit merge_requests_group_path(group) } + context 'for merge_requests_group_path' do + it_behaves_like 'renders only public project' do + subject(:visit_page) { visit merge_requests_group_path(group) } + end end it_behaves_like 'renders group in public groups area' |