From 9eeba8fb49c5da7cf0b2c22bc33cbd33a83918ed Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Thu, 6 Jul 2017 12:20:50 -0400 Subject: Auto-correct ProjectPathHelper violations --- spec/features/search_spec.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'spec/features/search_spec.rb') diff --git a/spec/features/search_spec.rb b/spec/features/search_spec.rb index 7c3081445d1..12ef23440b7 100644 --- a/spec/features/search_spec.rb +++ b/spec/features/search_spec.rb @@ -88,7 +88,7 @@ describe "Search", feature: true do end it 'finds comment' do - visit namespace_project_path(project.namespace, project) + visit project_path(project) page.within '.search' do fill_in 'search', with: note.note @@ -111,7 +111,7 @@ describe "Search", feature: true do project: project) # Must visit project dashboard since global search won't search # everything (e.g. comments, snippets, etc.) - visit namespace_project_path(project.namespace, project) + visit project_path(project) page.within '.search' do fill_in 'search', with: note.note @@ -125,7 +125,7 @@ describe "Search", feature: true do it 'finds a commit' do project = create(:project, :repository) { |p| p.add_reporter(user) } - visit namespace_project_path(project.namespace, project) + visit project_path(project) page.within '.search' do fill_in 'search', with: 'add' @@ -139,7 +139,7 @@ describe "Search", feature: true do it 'finds a code' do project = create(:project, :repository) { |p| p.add_reporter(user) } - visit namespace_project_path(project.namespace, project) + visit project_path(project) page.within '.search' do fill_in 'search', with: 'application.js' @@ -156,7 +156,7 @@ describe "Search", feature: true do describe 'Right header search field', feature: true do it 'allows enter key to search', js: true do - visit namespace_project_path(project.namespace, project) + visit project_path(project) fill_in 'search', with: 'gitlab' find('#search').native.send_keys(:enter) @@ -167,7 +167,7 @@ describe "Search", feature: true do describe 'Search in project page' do before do - visit namespace_project_path(project.namespace, project) + visit project_path(project) end it 'shows top right search form' do @@ -256,7 +256,7 @@ describe "Search", feature: true do click_button 'Search' - expect(page).to have_current_path(namespace_project_commit_path(project.namespace, project, '6d394385cf567f80a8fd85055db1ab4c5295806f')) + expect(page).to have_current_path(project_commit_path(project, '6d394385cf567f80a8fd85055db1ab4c5295806f')) end it 'redirects to single commit regardless of query case' do @@ -264,7 +264,7 @@ describe "Search", feature: true do click_button 'Search' - expect(page).to have_current_path(namespace_project_commit_path(project.namespace, project, '6d394385cf567f80a8fd85055db1ab4c5295806f')) + expect(page).to have_current_path(project_commit_path(project, '6d394385cf567f80a8fd85055db1ab4c5295806f')) end it 'holds on /search page when the only commit is found by message' do -- cgit v1.2.1