summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2018-05-25 10:16:17 -0500
committerRobert Speicher <rspeicher@gmail.com>2018-05-25 10:18:10 -0500
commit5d2d278919a926e37a1a640368f64eeff13d75de (patch)
treeae87ca96384a70adcb816679676bf7548a92817d /qa
parentb07771683d611d16d08a6a316e0966bf42cd0c88 (diff)
downloadgitlab-ce-5d2d278919a926e37a1a640368f64eeff13d75de.tar.gz
Simplify users API QA specqa/rs-api-users-spec
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/specs/features/api/users_spec.rb9
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