diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-11-07 21:23:54 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-11-07 21:23:54 +0900 |
commit | bbdb0cf05141cdf9931e2aa673bf7a2ce5db0078 (patch) | |
tree | cf0e3da342c5543d817484d5130bc1e69012359a /spec/support | |
parent | ce7b05f41d3941552320c23dc06f9f2b076099ed (diff) | |
parent | 666ab4882f2c6d385c04afe269ddf5b11f795b19 (diff) | |
download | gitlab-ce-bbdb0cf05141cdf9931e2aa673bf7a2ce5db0078.tar.gz |
Merge branch 'master' into 38464-k8s-apps
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/shared_examples/requests/api/custom_attributes_shared_examples.rb | 5 |
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 |