summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorhttp://jneen.net/ <jneen@jneen.net>2017-04-06 14:06:42 -0700
committerhttp://jneen.net/ <jneen@jneen.net>2017-06-27 12:44:37 -0700
commit37c401433b76170f0150d70865f1f4584db01fa8 (patch)
tree2da7a4c072b863e0cb927993d8d39e7029d720e4 /spec
parente5aad75a2673b2e4465d311cbd27970d5c81d5f7 (diff)
downloadgitlab-ce-37c401433b76170f0150d70865f1f4584db01fa8.tar.gz
convert all the policies to DeclarativePolicy
Diffstat (limited to 'spec')
-rw-r--r--spec/policies/project_policy_spec.rb4
-rw-r--r--spec/policies/project_snippet_policy_spec.rb2
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)