diff options
Diffstat (limited to 'spec/features/tags')
-rw-r--r-- | spec/features/tags/master_creates_tag_spec.rb | 8 | ||||
-rw-r--r-- | spec/features/tags/master_deletes_tag_spec.rb | 6 | ||||
-rw-r--r-- | spec/features/tags/master_updates_tag_spec.rb | 6 | ||||
-rw-r--r-- | spec/features/tags/master_views_tags_spec.rb | 20 |
4 files changed, 20 insertions, 20 deletions
diff --git a/spec/features/tags/master_creates_tag_spec.rb b/spec/features/tags/master_creates_tag_spec.rb index e575456c083..1cef3d5c6f4 100644 --- a/spec/features/tags/master_creates_tag_spec.rb +++ b/spec/features/tags/master_creates_tag_spec.rb @@ -11,7 +11,7 @@ feature 'Master creates tag', feature: true do context 'from tag list' do before do - visit namespace_project_tags_path(project.namespace, project) + visit project_tags_path(project) end scenario 'with an invalid name displays an error' do @@ -36,7 +36,7 @@ feature 'Master creates tag', feature: true do create_tag_in_form(tag: 'v3.0', ref: 'master', message: "Awesome tag message\n\n- hello\n- world") expect(current_path).to eq( - namespace_project_tag_path(project.namespace, project, 'v3.0')) + project_tag_path(project, 'v3.0')) expect(page).to have_content 'v3.0' page.within 'pre.wrap' do expect(page).to have_content "Awesome tag message\n\n- hello\n- world" @@ -47,7 +47,7 @@ feature 'Master creates tag', feature: true do create_tag_in_form(tag: 'v4.0', ref: 'master', desc: "Awesome release notes\n\n- hello\n- world") expect(current_path).to eq( - namespace_project_tag_path(project.namespace, project, 'v4.0')) + project_tag_path(project, 'v4.0')) expect(page).to have_content 'v4.0' page.within '.description' do expect(page).to have_content 'Awesome release notes' @@ -72,7 +72,7 @@ feature 'Master creates tag', feature: true do context 'from new tag page' do before do - visit new_namespace_project_tag_path(project.namespace, project) + visit new_project_tag_path(project) end it 'description has autocomplete', :js do diff --git a/spec/features/tags/master_deletes_tag_spec.rb b/spec/features/tags/master_deletes_tag_spec.rb index 78e54476933..98af1d6b4f7 100644 --- a/spec/features/tags/master_deletes_tag_spec.rb +++ b/spec/features/tags/master_deletes_tag_spec.rb @@ -7,7 +7,7 @@ feature 'Master deletes tag', feature: true do before do project.team << [user, :master] sign_in(user) - visit namespace_project_tags_path(project.namespace, project) + visit project_tags_path(project) end context 'from the tags list page', js: true do @@ -24,12 +24,12 @@ feature 'Master deletes tag', feature: true do scenario 'deletes the tag' do click_on 'v1.0.0' expect(current_path).to eq( - namespace_project_tag_path(project.namespace, project, 'v1.0.0')) + project_tag_path(project, 'v1.0.0')) click_on 'Delete tag' expect(current_path).to eq( - namespace_project_tags_path(project.namespace, project)) + project_tags_path(project)) expect(page).not_to have_content 'v1.0.0' end end diff --git a/spec/features/tags/master_updates_tag_spec.rb b/spec/features/tags/master_updates_tag_spec.rb index 5b5ffda031e..1b61fde7227 100644 --- a/spec/features/tags/master_updates_tag_spec.rb +++ b/spec/features/tags/master_updates_tag_spec.rb @@ -7,7 +7,7 @@ feature 'Master updates tag', feature: true do before do project.team << [user, :master] sign_in(user) - visit namespace_project_tags_path(project.namespace, project) + visit project_tags_path(project) end context 'from the tags list page' do @@ -20,7 +20,7 @@ feature 'Master updates tag', feature: true do click_button 'Save changes' expect(current_path).to eq( - namespace_project_tag_path(project.namespace, project, 'v1.1.0')) + project_tag_path(project, 'v1.1.0')) expect(page).to have_content 'v1.1.0' expect(page).to have_content 'Awesome release notes' end @@ -45,7 +45,7 @@ feature 'Master updates tag', feature: true do click_button 'Save changes' expect(current_path).to eq( - namespace_project_tag_path(project.namespace, project, 'v1.1.0')) + project_tag_path(project, 'v1.1.0')) expect(page).to have_content 'v1.1.0' expect(page).to have_content 'Awesome release notes' end diff --git a/spec/features/tags/master_views_tags_spec.rb b/spec/features/tags/master_views_tags_spec.rb index 09bfc0b790b..fb910feae34 100644 --- a/spec/features/tags/master_views_tags_spec.rb +++ b/spec/features/tags/master_views_tags_spec.rb @@ -11,13 +11,13 @@ feature 'Master views tags', feature: true do context 'when project has no tags' do let(:project) { create(:project_empty_repo) } before do - visit namespace_project_path(project.namespace, project) + visit project_path(project) click_on 'README' fill_in :commit_message, with: 'Add a README file', visible: true # Remove pre-receive hook so we can push without auth FileUtils.rm_f(File.join(project.repository.path, 'hooks', 'pre-receive')) click_button 'Commit changes' - visit namespace_project_tags_path(project.namespace, project) + visit project_tags_path(project) end scenario 'displays a specific message' do @@ -30,15 +30,15 @@ feature 'Master views tags', feature: true do let(:repository) { project.repository } before do - visit namespace_project_tags_path(project.namespace, project) + visit project_tags_path(project) end scenario 'avoids a N+1 query in branches index' do - control_count = ActiveRecord::QueryRecorder.new { visit namespace_project_tags_path(project.namespace, project) }.count + control_count = ActiveRecord::QueryRecorder.new { visit project_tags_path(project) }.count %w(one two three four five).each { |tag| repository.add_tag(user, tag, 'master', 'foo') } - expect { visit namespace_project_tags_path(project.namespace, project) }.not_to exceed_query_limit(control_count) + expect { visit project_tags_path(project) }.not_to exceed_query_limit(control_count) end scenario 'views the tags list page' do @@ -49,7 +49,7 @@ feature 'Master views tags', feature: true do click_on 'v1.0.0' expect(current_path).to eq( - namespace_project_tag_path(project.namespace, project, 'v1.0.0')) + project_tag_path(project, 'v1.0.0')) expect(page).to have_content 'v1.0.0' expect(page).to have_content 'This tag has no release notes.' end @@ -59,24 +59,24 @@ feature 'Master views tags', feature: true do click_on 'v1.0.0' expect(current_path).to eq( - namespace_project_tag_path(project.namespace, project, 'v1.0.0')) + project_tag_path(project, 'v1.0.0')) click_on 'Browse files' expect(current_path).to eq( - namespace_project_tree_path(project.namespace, project, 'v1.0.0')) + project_tree_path(project, 'v1.0.0')) end scenario 'has a button to browse commits' do click_on 'v1.0.0' expect(current_path).to eq( - namespace_project_tag_path(project.namespace, project, 'v1.0.0')) + project_tag_path(project, 'v1.0.0')) click_on 'Browse commits' expect(current_path).to eq( - namespace_project_commits_path(project.namespace, project, 'v1.0.0')) + project_commits_path(project, 'v1.0.0')) end end end |