summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-11-07 10:59:38 +0000
committerRémy Coutable <remy@rymai.me>2017-11-07 10:59:38 +0000
commit31e3ef93e53802bb99b342a7b403972493ed63cc (patch)
tree150d4328b00f71c2f28f7a58003b73e3d0548b5c /spec/support
parent2ec5ae21b8ab16bea83c4b00df5bf17be8ad34c6 (diff)
parent1f773a8ef5a1f76166d0455c6a5e473278885c17 (diff)
downloadgitlab-ce-31e3ef93e53802bb99b342a7b403972493ed63cc.tar.gz
Merge branch 'feature/custom-attributes-on-projects-and-groups' into 'master'
Support custom attributes on groups and projects See merge request gitlab-org/gitlab-ce!14593
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/shared_examples/requests/api/custom_attributes_shared_examples.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/support/shared_examples/requests/api/custom_attributes_shared_examples.rb b/spec/support/shared_examples/requests/api/custom_attributes_shared_examples.rb
index 6bc39f2f279..4e18804b937 100644
--- a/spec/support/shared_examples/requests/api/custom_attributes_shared_examples.rb
+++ b/spec/support/shared_examples/requests/api/custom_attributes_shared_examples.rb
@@ -3,7 +3,9 @@ shared_examples 'custom attributes endpoints' do |attributable_name|
let!(:custom_attribute2) { attributable.custom_attributes.create key: 'bar', value: 'bar' }
describe "GET /#{attributable_name} with custom attributes filter" do
- let!(:other_attributable) { create attributable.class.name.underscore }
+ before do
+ other_attributable
+ end
context 'with an unauthorized user' do
it 'does not filter by custom attributes' do
@@ -11,6 +13,7 @@ shared_examples 'custom attributes endpoints' do |attributable_name|
expect(response).to have_gitlab_http_status(200)
expect(json_response.size).to be 2
+ expect(json_response.map { |r| r['id'] }).to contain_exactly attributable.id, other_attributable.id
end
end