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/security/project/internal_access_spec.rb | |
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/security/project/internal_access_spec.rb')
-rw-r--r-- | spec/features/security/project/internal_access_spec.rb | 34 |
1 files changed, 17 insertions, 17 deletions
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 } |