Commit 5d2d2789 authored by Robert Speicher's avatar Robert Speicher

Simplify users API QA spec

parent b0777168
...@@ -17,17 +17,16 @@ module QA ...@@ -17,17 +17,16 @@ module QA
get request.url, { params: { username: Runtime::User.name } } get request.url, { params: { username: Runtime::User.name } }
expect_status(200) expect_status(200)
expect(json_body).to be_an Array expect(json_body).to contain_exactly(
expect(json_body.size).to eq(1) a_hash_including(username: Runtime::User.name)
expect(json_body.first[:username]).to eq Runtime::User.name )
end end
scenario 'submit request with an invalid user name' do scenario 'submit request with an invalid user name' do
get request.url, { params: { username: SecureRandom.hex(10) } } get request.url, { params: { username: SecureRandom.hex(10) } }
expect_status(200) expect_status(200)
expect(json_body).to be_an Array expect(json_body).to eq([])
expect(json_body.size).to eq(0)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment