diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-05-29 07:53:53 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-05-29 07:53:53 +0000 |
commit | a75d11211e356e856e563e390fb7470ed5cc3586 (patch) | |
tree | 72561bba2cb49d186f3ad50f8c5942d40cd195ea | |
parent | 35597a4c14c981b37a81bd95ed3f919e9da0ce4b (diff) | |
parent | 5d2d278919a926e37a1a640368f64eeff13d75de (diff) | |
download | gitlab-ce-a75d11211e356e856e563e390fb7470ed5cc3586.tar.gz |
Merge branch 'qa/rs-api-users-spec' into 'master'
Simplify users API QA spec
See merge request gitlab-org/gitlab-ce!19147
-rw-r--r-- | qa/qa/specs/features/api/users_spec.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/qa/qa/specs/features/api/users_spec.rb b/qa/qa/specs/features/api/users_spec.rb index d4ff4ebbc9a..38f4c497183 100644 --- a/qa/qa/specs/features/api/users_spec.rb +++ b/qa/qa/specs/features/api/users_spec.rb @@ -17,17 +17,16 @@ module QA get request.url, { params: { username: Runtime::User.name } } expect_status(200) - expect(json_body).to be_an Array - expect(json_body.size).to eq(1) - expect(json_body.first[:username]).to eq Runtime::User.name + expect(json_body).to contain_exactly( + a_hash_including(username: Runtime::User.name) + ) end scenario 'submit request with an invalid user name' do get request.url, { params: { username: SecureRandom.hex(10) } } expect_status(200) - expect(json_body).to be_an Array - expect(json_body.size).to eq(0) + expect(json_body).to eq([]) end end |