Skip to content
Snippets Groups Projects
Unverified Commit 6902848a authored by Markus Koller's avatar Markus Koller Committed by Markus Koller
Browse files

Support custom attributes on projects

parent 823a9d35
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -1880,7 +1880,8 @@ describe API::Users do
end
end
 
include_examples 'custom attributes endpoints', 'users' do
it_behaves_like 'custom attributes endpoints', 'users' do
let(:attributable) { user }
let(:other_attributable) { admin }
end
end
Loading
Loading
@@ -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
Loading
Loading
@@ -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
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment