diff options
author | Vinnie Okada <vokada@mrvinn.com> | 2015-01-24 11:02:58 -0700 |
---|---|---|
committer | Vinnie Okada <vokada@mrvinn.com> | 2015-02-14 11:09:23 -0700 |
commit | 76aad9b76ed756ca9ba2cbcdb399c815e542b3ae (patch) | |
tree | 7226e0ce64796abbf4848582baed8d173ddecd14 /spec/features | |
parent | 5725b6daad2f403f13112cfcafa5b45ac126c0ca (diff) | |
download | gitlab-ce-76aad9b76ed756ca9ba2cbcdb399c815e542b3ae.tar.gz |
Upgrade to Rails 4.1.9
Make the following changes to deal with new behavior in Rails 4.1.2:
* Use nested resources to avoid slashes in arguments to path helpers.
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/admin/admin_projects_spec.rb | 6 | ||||
-rw-r--r-- | spec/features/admin/security_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/atom/issues_spec.rb | 6 | ||||
-rw-r--r-- | spec/features/gitlab_flavored_markdown_spec.rb | 24 | ||||
-rw-r--r-- | spec/features/issues_spec.rb | 42 | ||||
-rw-r--r-- | spec/features/notes_on_merge_requests_spec.rb | 4 | ||||
-rw-r--r-- | spec/features/projects_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/security/project/internal_access_spec.rb | 34 | ||||
-rw-r--r-- | spec/features/security/project/private_access_spec.rb | 30 | ||||
-rw-r--r-- | spec/features/security/project/public_access_spec.rb | 34 |
10 files changed, 92 insertions, 92 deletions
diff --git a/spec/features/admin/admin_projects_spec.rb b/spec/features/admin/admin_projects_spec.rb index eae3d102334..101d955d693 100644 --- a/spec/features/admin/admin_projects_spec.rb +++ b/spec/features/admin/admin_projects_spec.rb @@ -8,11 +8,11 @@ describe "Admin::Projects", feature: true do describe "GET /admin/projects" do before do - visit admin_projects_path + visit admin_namespaces_projects_path end it "should be ok" do - expect(current_path).to eq(admin_projects_path) + expect(current_path).to eq(admin_namespaces_projects_path) end it "should have projects list" do @@ -22,7 +22,7 @@ describe "Admin::Projects", feature: true do describe "GET /admin/projects/:id" do before do - visit admin_projects_path + visit admin_namespaces_projects_path click_link "#{@project.name}" end diff --git a/spec/features/admin/security_spec.rb b/spec/features/admin/security_spec.rb index 2bcd3d8d010..175fa9d4647 100644 --- a/spec/features/admin/security_spec.rb +++ b/spec/features/admin/security_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe "Admin::Projects", feature: true do describe "GET /admin/projects" do - subject { admin_projects_path } + subject { admin_namespaces_projects_path } it { is_expected.to be_allowed_for :admin } it { is_expected.to be_denied_for :user } diff --git a/spec/features/atom/issues_spec.rb b/spec/features/atom/issues_spec.rb index 43163e4113e..baa7814e96a 100644 --- a/spec/features/atom/issues_spec.rb +++ b/spec/features/atom/issues_spec.rb @@ -11,7 +11,7 @@ describe 'Issues Feed', feature: true do context 'when authenticated' do it 'should render atom feed' do login_with user - visit project_issues_path(project, :atom) + visit namespace_project_issues_path(project.namespace, project, :atom) expect(response_headers['Content-Type']). to have_content('application/atom+xml') @@ -23,8 +23,8 @@ describe 'Issues Feed', feature: true do context 'when authenticated via private token' do it 'should render atom feed' do - visit project_issues_path(project, :atom, - private_token: user.private_token) + visit namespace_project_issues_path(project.namespace, project, :atom, + private_token: user.private_token) expect(response_headers['Content-Type']). to have_content('application/atom+xml') diff --git a/spec/features/gitlab_flavored_markdown_spec.rb b/spec/features/gitlab_flavored_markdown_spec.rb index 73a9f78708a..fca1a06eb88 100644 --- a/spec/features/gitlab_flavored_markdown_spec.rb +++ b/spec/features/gitlab_flavored_markdown_spec.rb @@ -23,25 +23,25 @@ describe "GitLab Flavored Markdown", feature: true do describe "for commits" do it "should render title in commits#index" do - visit project_commits_path(project, 'master', limit: 1) + visit namespace_project_commits_path(project.namespace, project, 'master', limit: 1) expect(page).to have_link("##{issue.iid}") end it "should render title in commits#show" do - visit project_commit_path(project, commit) + visit namespace_project_commit_path(project.namespace, project, commit) expect(page).to have_link("##{issue.iid}") end it "should render description in commits#show" do - visit project_commit_path(project, commit) + visit namespace_project_commit_path(project.namespace, project, commit) expect(page).to have_link("@#{fred.username}") end it "should render title in repositories#branches" do - visit project_branches_path(project) + visit namespace_project_branches_path(project.namespace, project) expect(page).to have_link("##{issue.iid}") end @@ -62,19 +62,19 @@ describe "GitLab Flavored Markdown", feature: true do end it "should render subject in issues#index" do - visit project_issues_path(project) + visit namespace_project_issues_path(project.namespace, project) expect(page).to have_link("##{@other_issue.iid}") end it "should render subject in issues#show" do - visit project_issue_path(project, @issue) + visit namespace_project_issue_path(project.namespace, project, @issue) expect(page).to have_link("##{@other_issue.iid}") end it "should render details in issues#show" do - visit project_issue_path(project, @issue) + visit namespace_project_issue_path(project.namespace, project, @issue) expect(page).to have_link("@#{fred.username}") end @@ -87,13 +87,13 @@ describe "GitLab Flavored Markdown", feature: true do end it "should render title in merge_requests#index" do - visit project_merge_requests_path(project) + visit namespace_project_merge_requests_path(project.namespace, project) expect(page).to have_link("##{issue.iid}") end it "should render title in merge_requests#show" do - visit project_merge_request_path(project, @merge_request) + visit namespace_project_merge_request_path(project.namespace, project, @merge_request) expect(page).to have_link("##{issue.iid}") end @@ -109,19 +109,19 @@ describe "GitLab Flavored Markdown", feature: true do end it "should render title in milestones#index" do - visit project_milestones_path(project) + visit namespace_project_milestones_path(project.namespace, project) expect(page).to have_link("##{issue.iid}") end it "should render title in milestones#show" do - visit project_milestone_path(project, @milestone) + visit namespace_project_milestone_path(project.namespace, project, @milestone) expect(page).to have_link("##{issue.iid}") end it "should render description in milestones#show" do - visit project_milestone_path(project, @milestone) + visit namespace_project_milestone_path(project.namespace, project, @milestone) expect(page).to have_link("@#{fred.username}") end diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index f54155439cb..a2db57ad908 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -21,7 +21,7 @@ describe 'Issues', feature: true do end before do - visit project_issues_path(project) + visit namespace_project_issues_path(project.namespace, project) click_link "Edit" end @@ -61,7 +61,7 @@ describe 'Issues', feature: true do end it 'allows user to select unasigned', js: true do - visit edit_project_issue_path(project, issue) + visit edit_namespace_project_issue_path(project.namespace, project, issue) expect(page).to have_content "Assign to #{@user.name}" @@ -95,7 +95,7 @@ describe 'Issues', feature: true do let(:issue) { @issue } it 'should allow filtering by issues with no specified milestone' do - visit project_issues_path(project, milestone_id: '0') + visit namespace_project_issues_path(project.namespace, project, milestone_id: '0') expect(page).not_to have_content 'foobar' expect(page).to have_content 'barbaz' @@ -103,7 +103,7 @@ describe 'Issues', feature: true do end it 'should allow filtering by a specified milestone' do - visit project_issues_path(project, milestone_id: issue.milestone.id) + visit namespace_project_issues_path(project.namespace, project, milestone_id: issue.milestone.id) expect(page).to have_content 'foobar' expect(page).not_to have_content 'barbaz' @@ -111,7 +111,7 @@ describe 'Issues', feature: true do end it 'should allow filtering by issues with no specified assignee' do - visit project_issues_path(project, assignee_id: '0') + visit namespace_project_issues_path(project.namespace, project, assignee_id: '0') expect(page).to have_content 'foobar' expect(page).not_to have_content 'barbaz' @@ -119,7 +119,7 @@ describe 'Issues', feature: true do end it 'should allow filtering by a specified assignee' do - visit project_issues_path(project, assignee_id: @user.id) + visit namespace_project_issues_path(project.namespace, project, assignee_id: @user.id) expect(page).not_to have_content 'foobar' expect(page).to have_content 'barbaz' @@ -140,14 +140,14 @@ describe 'Issues', feature: true do let(:later_due_milestone) { create(:milestone, due_date: '2013-12-12') } it 'sorts by newest' do - visit project_issues_path(project, sort: sort_value_recently_created) + visit namespace_project_issues_path(project.namespace, project, sort: sort_value_recently_created) expect(first_issue).to include('foo') expect(last_issue).to include('baz') end it 'sorts by oldest' do - visit project_issues_path(project, sort: sort_value_oldest_created) + visit namespace_project_issues_path(project.namespace, project, sort: sort_value_oldest_created) expect(first_issue).to include('baz') expect(last_issue).to include('foo') @@ -156,7 +156,7 @@ describe 'Issues', feature: true do it 'sorts by most recently updated' do baz.updated_at = Time.now + 100 baz.save - visit project_issues_path(project, sort: sort_value_recently_updated) + visit namespace_project_issues_path(project.namespace, project, sort: sort_value_recently_updated) expect(first_issue).to include('baz') end @@ -164,7 +164,7 @@ describe 'Issues', feature: true do it 'sorts by least recently updated' do baz.updated_at = Time.now - 100 baz.save - visit project_issues_path(project, sort: sort_value_oldest_updated) + visit namespace_project_issues_path(project.namespace, project, sort: sort_value_oldest_updated) expect(first_issue).to include('baz') end @@ -178,13 +178,13 @@ describe 'Issues', feature: true do end it 'sorts by recently due milestone' do - visit project_issues_path(project, sort: sort_value_milestone_soon) + visit namespace_project_issues_path(project.namespace, project, sort: sort_value_milestone_soon) expect(first_issue).to include('foo') end it 'sorts by least recently due milestone' do - visit project_issues_path(project, sort: sort_value_milestone_later) + visit namespace_project_issues_path(project.namespace, project, sort: sort_value_milestone_later) expect(first_issue).to include('bar') end @@ -201,9 +201,9 @@ describe 'Issues', feature: true do end it 'sorts with a filter applied' do - visit project_issues_path(project, - sort: sort_value_oldest_created, - assignee_id: user2.id) + visit namespace_project_issues_path(project.namespace, project, + sort: sort_value_oldest_created, + assignee_id: user2.id) expect(first_issue).to include('bar') expect(last_issue).to include('foo') @@ -218,7 +218,7 @@ describe 'Issues', feature: true do context 'by autorized user' do it 'with dropdown menu' do - visit project_issue_path(project, issue) + visit namespace_project_issue_path(project.namespace, project, issue) find('.edit-issue.inline-update #issue_assignee_id'). set project.team.members.first.id @@ -244,7 +244,7 @@ describe 'Issues', feature: true do logout login_with guest - visit project_issue_path(project, issue) + visit namespace_project_issue_path(project.namespace, project, issue) expect(page).to have_content issue.assignee.name end end @@ -257,7 +257,7 @@ describe 'Issues', feature: true do context 'by authorized user' do it 'with dropdown menu' do - visit project_issue_path(project, issue) + visit namespace_project_issue_path(project.namespace, project, issue) find('.edit-issue.inline-update'). select(milestone.title, from: 'issue_milestone_id') @@ -282,7 +282,7 @@ describe 'Issues', feature: true do logout login_with guest - visit project_issue_path(project, issue) + visit namespace_project_issue_path(project.namespace, project, issue) expect(page).to have_content milestone.title end end @@ -295,8 +295,8 @@ describe 'Issues', feature: true do issue.save end - it 'allows user to remove assignee', js: true do - visit project_issue_path(project, issue) + it 'allows user to remove assignee', :js => true do + visit namespace_project_issue_path(project.namespace, project, issue) expect(page).to have_content "Assignee: #{user2.name}" first('#s2id_issue_assignee_id').click diff --git a/spec/features/notes_on_merge_requests_spec.rb b/spec/features/notes_on_merge_requests_spec.rb index 7790d0ecd73..5c8b1f5be36 100644 --- a/spec/features/notes_on_merge_requests_spec.rb +++ b/spec/features/notes_on_merge_requests_spec.rb @@ -12,7 +12,7 @@ describe 'Comments' do before do login_as :admin - visit project_merge_request_path(project, merge_request) + visit namespace_project_merge_request_path(project.namespace, project, merge_request) end subject { page } @@ -136,7 +136,7 @@ describe 'Comments' do before do login_as :admin - visit diffs_project_merge_request_path(project, merge_request) + visit diffs_namespace_project_merge_request_path(project.namespace, project, merge_request) end subject { page } diff --git a/spec/features/projects_spec.rb b/spec/features/projects_spec.rb index d291621935b..cae11be7cdd 100644 --- a/spec/features/projects_spec.rb +++ b/spec/features/projects_spec.rb @@ -7,7 +7,7 @@ describe "Projects", feature: true, js: true do before do @project = create(:project, namespace: @user.namespace) @project.team << [@user, :master] - visit edit_project_path(@project) + visit edit_namespace_project_path(@project.namespace, @project) end it "should remove project" do diff --git a/spec/features/security/project/internal_access_spec.rb b/spec/features/security/project/internal_access_spec.rb index 81f94e33569..322697bced8 100644 --- a/spec/features/security/project/internal_access_spec.rb +++ b/spec/features/security/project/internal_access_spec.rb @@ -25,7 +25,7 @@ describe "Internal Project Access", feature: true do end describe "GET /:project_path" do - subject { project_path(project) } + subject { namespace_project_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -36,7 +36,7 @@ describe "Internal Project Access", feature: true do end describe "GET /:project_path/tree/master" do - subject { project_tree_path(project, project.repository.root_ref) } + subject { namespace_project_tree_path(project.namespace, project, project.repository.root_ref) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -47,7 +47,7 @@ describe "Internal Project Access", feature: true do end describe "GET /:project_path/commits/master" do - subject { project_commits_path(project, project.repository.root_ref, limit: 1) } + subject { namespace_project_commits_path(project.namespace, project, project.repository.root_ref, limit: 1) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -58,7 +58,7 @@ describe "Internal Project Access", feature: true do end describe "GET /:project_path/commit/:sha" do - subject { project_commit_path(project, project.repository.commit) } + subject { namespace_project_commit_path(project.namespace, project, project.repository.commit) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -69,7 +69,7 @@ describe "Internal Project Access", feature: true do end describe "GET /:project_path/compare" do - subject { project_compare_index_path(project) } + subject { namespace_project_compare_index_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -80,7 +80,7 @@ describe "Internal Project Access", feature: true do end describe "GET /:project_path/team" do - subject { project_team_index_path(project) } + subject { namespace_project_team_index_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_denied_for reporter } @@ -94,7 +94,7 @@ describe "Internal Project Access", feature: true do before do commit = project.repository.commit path = '.gitignore' - @blob_path = project_blob_path(project, File.join(commit.id, path)) + @blob_path = namespace_project_blob_path(project.namespace, project, File.join(commit.id, path)) end it { expect(@blob_path).to be_allowed_for master } @@ -106,7 +106,7 @@ describe "Internal Project Access", feature: true do end describe "GET /:project_path/edit" do - subject { edit_project_path(project) } + subject { edit_namespace_project_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_denied_for reporter } @@ -117,7 +117,7 @@ describe "Internal Project Access", feature: true do end describe "GET /:project_path/deploy_keys" do - subject { project_deploy_keys_path(project) } + subject { namespace_project_deploy_keys_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_denied_for reporter } @@ -128,7 +128,7 @@ describe "Internal Project Access", feature: true do end describe "GET /:project_path/issues" do - subject { project_issues_path(project) } + subject { namespace_project_issues_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -139,7 +139,7 @@ describe "Internal Project Access", feature: true do end describe "GET /:project_path/snippets" do - subject { project_snippets_path(project) } + subject { namespace_project_snippets_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -150,7 +150,7 @@ describe "Internal Project Access", feature: true do end describe "GET /:project_path/snippets/new" do - subject { new_project_snippet_path(project) } + subject { new_namespace_project_snippet_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -161,7 +161,7 @@ describe "Internal Project Access", feature: true do end describe "GET /:project_path/merge_requests" do - subject { project_merge_requests_path(project) } + subject { namespace_project_merge_requests_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -172,7 +172,7 @@ describe "Internal Project Access", feature: true do end describe "GET /:project_path/merge_requests/new" do - subject { new_project_merge_request_path(project) } + subject { new_namespace_project_merge_request_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_denied_for reporter } @@ -183,7 +183,7 @@ describe "Internal Project Access", feature: true do end describe "GET /:project_path/branches" do - subject { project_branches_path(project) } + subject { namespace_project_branches_path(project.namespace, project) } before do # Speed increase @@ -199,7 +199,7 @@ describe "Internal Project Access", feature: true do end describe "GET /:project_path/tags" do - subject { project_tags_path(project) } + subject { namespace_project_tags_path(project.namespace, project) } before do # Speed increase @@ -215,7 +215,7 @@ describe "Internal Project Access", feature: true do end describe "GET /:project_path/hooks" do - subject { project_hooks_path(project) } + subject { namespace_project_hooks_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_denied_for reporter } diff --git a/spec/features/security/project/private_access_spec.rb b/spec/features/security/project/private_access_spec.rb index fd21e722611..ea146c3f0e4 100644 --- a/spec/features/security/project/private_access_spec.rb +++ b/spec/features/security/project/private_access_spec.rb @@ -25,7 +25,7 @@ describe "Private Project Access", feature: true do end describe "GET /:project_path" do - subject { project_path(project) } + subject { namespace_project_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -36,7 +36,7 @@ describe "Private Project Access", feature: true do end describe "GET /:project_path/tree/master" do - subject { project_tree_path(project, project.repository.root_ref) } + subject { namespace_project_tree_path(project.namespace, project, project.repository.root_ref) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -47,7 +47,7 @@ describe "Private Project Access", feature: true do end describe "GET /:project_path/commits/master" do - subject { project_commits_path(project, project.repository.root_ref, limit: 1) } + subject { namespace_project_commits_path(project.namespace, project, project.repository.root_ref, limit: 1) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -58,7 +58,7 @@ describe "Private Project Access", feature: true do end describe "GET /:project_path/commit/:sha" do - subject { project_commit_path(project, project.repository.commit) } + subject { namespace_project_commit_path(project.namespace, project, project.repository.commit) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -69,7 +69,7 @@ describe "Private Project Access", feature: true do end describe "GET /:project_path/compare" do - subject { project_compare_index_path(project) } + subject { namespace_project_compare_index_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -80,7 +80,7 @@ describe "Private Project Access", feature: true do end describe "GET /:project_path/team" do - subject { project_team_index_path(project) } + subject { namespace_project_team_index_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_denied_for reporter } @@ -94,7 +94,7 @@ describe "Private Project Access", feature: true do before do commit = project.repository.commit path = '.gitignore' - @blob_path = project_blob_path(project, File.join(commit.id, path)) + @blob_path = namespace_project_blob_path(project.namespace, project, File.join(commit.id, path)) end it { expect(@blob_path).to be_allowed_for master } @@ -106,7 +106,7 @@ describe "Private Project Access", feature: true do end describe "GET /:project_path/edit" do - subject { edit_project_path(project) } + subject { edit_namespace_project_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_denied_for reporter } @@ -117,7 +117,7 @@ describe "Private Project Access", feature: true do end describe "GET /:project_path/deploy_keys" do - subject { project_deploy_keys_path(project) } + subject { namespace_project_deploy_keys_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_denied_for reporter } @@ -128,7 +128,7 @@ describe "Private Project Access", feature: true do end describe "GET /:project_path/issues" do - subject { project_issues_path(project) } + subject { namespace_project_issues_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -139,7 +139,7 @@ describe "Private Project Access", feature: true do end describe "GET /:project_path/snippets" do - subject { project_snippets_path(project) } + subject { namespace_project_snippets_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -150,7 +150,7 @@ describe "Private Project Access", feature: true do end describe "GET /:project_path/merge_requests" do - subject { project_merge_requests_path(project) } + subject { namespace_project_merge_requests_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -161,7 +161,7 @@ describe "Private Project Access", feature: true do end describe "GET /:project_path/branches" do - subject { project_branches_path(project) } + subject { namespace_project_branches_path(project.namespace, project) } before do # Speed increase @@ -177,7 +177,7 @@ describe "Private Project Access", feature: true do end describe "GET /:project_path/tags" do - subject { project_tags_path(project) } + subject { namespace_project_tags_path(project.namespace, project) } before do # Speed increase @@ -193,7 +193,7 @@ describe "Private Project Access", feature: true do end describe "GET /:project_path/hooks" do - subject { project_hooks_path(project) } + subject { namespace_project_hooks_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_denied_for reporter } diff --git a/spec/features/security/project/public_access_spec.rb b/spec/features/security/project/public_access_spec.rb index ddc1c3be7df..8ee9199ff29 100644 --- a/spec/features/security/project/public_access_spec.rb +++ b/spec/features/security/project/public_access_spec.rb @@ -30,7 +30,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path" do - subject { project_path(project) } + subject { namespace_project_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -41,7 +41,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/tree/master" do - subject { project_tree_path(project, project.repository.root_ref) } + subject { namespace_project_tree_path(project.namespace, project, project.repository.root_ref) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -52,7 +52,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/commits/master" do - subject { project_commits_path(project, project.repository.root_ref, limit: 1) } + subject { namespace_project_commits_path(project.namespace, project, project.repository.root_ref, limit: 1) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -63,7 +63,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/commit/:sha" do - subject { project_commit_path(project, project.repository.commit) } + subject { namespace_project_commit_path(project.namespace, project, project.repository.commit) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -74,7 +74,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/compare" do - subject { project_compare_index_path(project) } + subject { namespace_project_compare_index_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -85,7 +85,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/team" do - subject { project_team_index_path(project) } + subject { namespace_project_team_index_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_denied_for reporter } @@ -99,7 +99,7 @@ describe "Public Project Access", feature: true do before do commit = project.repository.commit path = '.gitignore' - @blob_path = project_blob_path(project, File.join(commit.id, path)) + @blob_path = namespace_project_blob_path(project.namespace, project, File.join(commit.id, path)) end it { expect(@blob_path).to be_allowed_for master } @@ -111,7 +111,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/edit" do - subject { edit_project_path(project) } + subject { edit_namespace_project_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_denied_for reporter } @@ -122,7 +122,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/deploy_keys" do - subject { project_deploy_keys_path(project) } + subject { namespace_project_deploy_keys_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_denied_for reporter } @@ -133,7 +133,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/issues" do - subject { project_issues_path(project) } + subject { namespace_project_issues_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -144,7 +144,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/snippets" do - subject { project_snippets_path(project) } + subject { namespace_project_snippets_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -155,7 +155,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/snippets/new" do - subject { new_project_snippet_path(project) } + subject { new_namespace_project_snippet_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -166,7 +166,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/merge_requests" do - subject { project_merge_requests_path(project) } + subject { namespace_project_merge_requests_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_allowed_for reporter } @@ -177,7 +177,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/merge_requests/new" do - subject { new_project_merge_request_path(project) } + subject { new_namespace_project_merge_request_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_denied_for reporter } @@ -188,7 +188,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/branches" do - subject { project_branches_path(project) } + subject { namespace_project_branches_path(project.namespace, project) } before do # Speed increase @@ -204,7 +204,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/tags" do - subject { project_tags_path(project) } + subject { namespace_project_tags_path(project.namespace, project) } before do # Speed increase @@ -220,7 +220,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/hooks" do - subject { project_hooks_path(project) } + subject { namespace_project_hooks_path(project.namespace, project) } it { is_expected.to be_allowed_for master } it { is_expected.to be_denied_for reporter } |