diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-11 15:09:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-11 15:09:06 +0300 |
commit | 9517d0eb2ca8bde02d7fae2173e0a43b67b2b9f5 (patch) | |
tree | c3807f1807384fda69b8a42a439700f52b5dd1f0 /spec/policies/blob_policy_spec.rb | |
parent | 3454d4cbe3d553e14006e301a4d6843484ce675f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/policies/blob_policy_spec.rb')
-rw-r--r-- | spec/policies/blob_policy_spec.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/policies/blob_policy_spec.rb b/spec/policies/blob_policy_spec.rb index fc46b25f25c..daabcd844af 100644 --- a/spec/policies/blob_policy_spec.rb +++ b/spec/policies/blob_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe BlobPolicy, :enable_admin_mode do +RSpec.describe BlobPolicy do include_context 'ProjectPolicyTable context' include ProjectHelpers using RSpec::Parameterized::TableSyntax @@ -13,12 +13,13 @@ RSpec.describe BlobPolicy, :enable_admin_mode do subject(:policy) { described_class.new(user, blob) } - where(:project_level, :feature_access_level, :membership, :expected_count) do + where(:project_level, :feature_access_level, :membership, :admin_mode, :expected_count) do permission_table_for_guest_feature_access_and_non_private_project_only end with_them do it "grants permission" do + enable_admin_mode!(user) if admin_mode update_feature_access_level(project, feature_access_level) if expected_count == 1 |