formats my test properly
This commit is contained in:
parent
02e3846672
commit
228073986b
|
@ -82,10 +82,11 @@ describe API::API, api: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'GET /projects?simple=true' do
|
context 'GET /projects?simple=true' do
|
||||||
it 'should return a simplified version of all the projects' do
|
it 'returns a simplified version of all the projects' do
|
||||||
expected_keys = ["id", "http_url_to_repo", "web_url", "name", "name_with_namespace", "path", "path_with_namespace"]
|
expected_keys = ["id", "http_url_to_repo", "web_url", "name", "name_with_namespace", "path", "path_with_namespace"]
|
||||||
|
|
||||||
get api('/projects?simple=true', user)
|
get api('/projects?simple=true', user)
|
||||||
|
|
||||||
expect(response).to have_http_status(200)
|
expect(response).to have_http_status(200)
|
||||||
expect(json_response).to be_an Array
|
expect(json_response).to be_an Array
|
||||||
expect(json_response.first.keys).to match_array expected_keys
|
expect(json_response.first.keys).to match_array expected_keys
|
||||||
|
|
Loading…
Reference in New Issue