diff options
author | http://jneen.net/ <jneen@jneen.net> | 2017-04-06 14:06:42 -0700 |
---|---|---|
committer | http://jneen.net/ <jneen@jneen.net> | 2017-06-27 12:44:37 -0700 |
commit | 37c401433b76170f0150d70865f1f4584db01fa8 (patch) | |
tree | 2da7a4c072b863e0cb927993d8d39e7029d720e4 /spec/policies | |
parent | e5aad75a2673b2e4465d311cbd27970d5c81d5f7 (diff) | |
download | gitlab-ce-37c401433b76170f0150d70865f1f4584db01fa8.tar.gz |
convert all the policies to DeclarativePolicy
Diffstat (limited to 'spec/policies')
-rw-r--r-- | spec/policies/project_policy_spec.rb | 4 | ||||
-rw-r--r-- | spec/policies/project_snippet_policy_spec.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/policies/project_policy_spec.rb b/spec/policies/project_policy_spec.rb index 87b2bbf5a85..ca435dd0218 100644 --- a/spec/policies/project_policy_spec.rb +++ b/spec/policies/project_policy_spec.rb @@ -155,8 +155,8 @@ describe ProjectPolicy, models: true do end it do - is_expected.not_to include(:read_build) - is_expected.to include(:read_pipeline) + expect_disallowed(:read_build) + expect_allowed(:read_pipeline) end end end diff --git a/spec/policies/project_snippet_policy_spec.rb b/spec/policies/project_snippet_policy_spec.rb index 34218998803..2799f03fb9b 100644 --- a/spec/policies/project_snippet_policy_spec.rb +++ b/spec/policies/project_snippet_policy_spec.rb @@ -119,7 +119,7 @@ describe ProjectSnippetPolicy, models: true do context 'snippet author' do let(:snippet) { create(:project_snippet, :private, author: regular_user, project: project) } - subject { described_class(regular_user, snippet) } + subject { described_class.new(regular_user, snippet) } it do expect_allowed(:read_project_snippet) |