diff options
author | Brett Walker <bwalker@gitlab.com> | 2018-01-18 14:30:10 +0100 |
---|---|---|
committer | Brett Walker <bwalker@gitlab.com> | 2018-01-22 17:25:11 +0100 |
commit | c3c937366f57a78de3d7c19770521c68d746af69 (patch) | |
tree | aa89d3d87ff498f7d94354e7d8a0d1a113fb0786 | |
parent | d67567995a60470999f46267e5b47400e8f46db0 (diff) | |
download | gitlab-ce-c3c937366f57a78de3d7c19770521c68d746af69.tar.gz |
check for requesting username in QA api user spec
-rw-r--r-- | qa/qa/specs/features/api/users_spec.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/qa/qa/specs/features/api/users_spec.rb b/qa/qa/specs/features/api/users_spec.rb index 056787845ab..1991b650608 100644 --- a/qa/qa/specs/features/api/users_spec.rb +++ b/qa/qa/specs/features/api/users_spec.rb @@ -8,12 +8,15 @@ module QA let(:request) { Runtime::API::Request.new(@api_client, '/users') } scenario 'get list of users' do - get request.url + get request.url, { params: { per_page: 100 } } + expect_status(200) + expect(json_body.detect { |item| item[:username] == Runtime::User.name }).not_to be_nil end scenario 'submit request with an invalid user name' do get request.url, { params: { username: 'invalid' } } + expect_status(200) expect(json_body).to be_an Array expect(json_body.size).to eq(0) |