summaryrefslogtreecommitdiff
path: root/spec/policies
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2018-08-22 13:10:54 +0100
committerSean McGivern <sean@gitlab.com>2018-08-22 14:17:29 +0100
commitaff7dccc1f13e86b44dfa1530c6b5068dbb18f00 (patch)
tree0193754c17b7023499ad4d1cd438cb287547793d /spec/policies
parentb63ed7cff664bc1ee0bf70912fffd4814f757079 (diff)
downloadgitlab-ce-aff7dccc1f13e86b44dfa1530c6b5068dbb18f00.tar.gz
Use policies to determine if attributes can be set in the API
This is more idiomatic than checking membership explicitly.
Diffstat (limited to 'spec/policies')
-rw-r--r--spec/policies/group_policy_spec.rb1
-rw-r--r--spec/policies/project_policy_spec.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/spec/policies/group_policy_spec.rb b/spec/policies/group_policy_spec.rb
index 615fea11f26..f276535265b 100644
--- a/spec/policies/group_policy_spec.rb
+++ b/spec/policies/group_policy_spec.rb
@@ -31,6 +31,7 @@ describe GroupPolicy do
:admin_namespace,
:admin_group_member,
:change_visibility_level,
+ :set_note_created_at,
(Gitlab::Database.postgresql? ? :create_subgroup : nil)
].compact
end
diff --git a/spec/policies/project_policy_spec.rb b/spec/policies/project_policy_spec.rb
index dd3fa4e6a51..b7ec35d6ec5 100644
--- a/spec/policies/project_policy_spec.rb
+++ b/spec/policies/project_policy_spec.rb
@@ -64,6 +64,7 @@ describe ProjectPolicy do
%i[
change_namespace change_visibility_level rename_project remove_project
archive_project remove_fork_project destroy_merge_request destroy_issue
+ set_issue_iid set_issue_created_at set_note_created_at
]
end