diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-06-29 12:06:35 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-07-05 11:11:59 -0500 |
commit | fe13f110412d85c05dc68e5ee1db499f681bf722 (patch) | |
tree | 4a2d172bb5a490ac8cadbcf376fbf815393ef22b /spec/features/protected_branches_spec.rb | |
parent | dc7939337e0d72d2391c3bbb3082d644a54195af (diff) | |
download | gitlab-ce-fe13f110412d85c05dc68e5ee1db499f681bf722.tar.gz |
Create and use project path helpers that only need a project, no namespace
Diffstat (limited to 'spec/features/protected_branches_spec.rb')
-rw-r--r-- | spec/features/protected_branches_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/features/protected_branches_spec.rb b/spec/features/protected_branches_spec.rb index 20b8e10f0f7..952eb6c3643 100644 --- a/spec/features/protected_branches_spec.rb +++ b/spec/features/protected_branches_spec.rb @@ -16,7 +16,7 @@ feature 'Protected Branches', feature: true, js: true do describe "explicit protected branches" do it "allows creating explicit protected branches" do - visit namespace_project_protected_branches_path(project.namespace, project) + visit project_protected_branches_path(project) set_protected_branch_name('some-branch') click_on "Protect" @@ -29,7 +29,7 @@ feature 'Protected Branches', feature: true, js: true do commit = create(:commit, project: project) project.repository.add_branch(user, 'some-branch', commit.id) - visit namespace_project_protected_branches_path(project.namespace, project) + visit project_protected_branches_path(project) set_protected_branch_name('some-branch') click_on "Protect" @@ -37,7 +37,7 @@ feature 'Protected Branches', feature: true, js: true do end it "displays an error message if the named branch does not exist" do - visit namespace_project_protected_branches_path(project.namespace, project) + visit project_protected_branches_path(project) set_protected_branch_name('some-branch') click_on "Protect" @@ -47,7 +47,7 @@ feature 'Protected Branches', feature: true, js: true do describe "wildcard protected branches" do it "allows creating protected branches with a wildcard" do - visit namespace_project_protected_branches_path(project.namespace, project) + visit project_protected_branches_path(project) set_protected_branch_name('*-stable') click_on "Protect" @@ -60,7 +60,7 @@ feature 'Protected Branches', feature: true, js: true do project.repository.add_branch(user, 'production-stable', 'master') project.repository.add_branch(user, 'staging-stable', 'master') - visit namespace_project_protected_branches_path(project.namespace, project) + visit project_protected_branches_path(project) set_protected_branch_name('*-stable') click_on "Protect" @@ -72,11 +72,11 @@ feature 'Protected Branches', feature: true, js: true do project.repository.add_branch(user, 'staging-stable', 'master') project.repository.add_branch(user, 'development', 'master') - visit namespace_project_protected_branches_path(project.namespace, project) + visit project_protected_branches_path(project) set_protected_branch_name('*-stable') click_on "Protect" - visit namespace_project_protected_branches_path(project.namespace, project) + visit project_protected_branches_path(project) click_on "2 matching branches" within(".protected-branches-list") do |