Skip to content
Snippets Groups Projects
Commit a5cf953d authored by tiagonbotelho's avatar tiagonbotelho
Browse files

moves let variable to it statement by using a local variable

parent d85dde19
No related branches found
No related tags found
No related merge requests found
Loading
@@ -82,12 +82,12 @@ describe API::API, api: true do
Loading
@@ -82,12 +82,12 @@ describe API::API, api: true do
end end
   
context 'GET /projects?simple=true' do context 'GET /projects?simple=true' do
let(:keys) { ["id", "http_url_to_repo", "web_url", "name", "name_with_namespace", "path", "path_with_namespace", "permissions"] }
it 'should return a simplified version of all the projects' do it 'should return 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", "permissions"]
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 keys expect(json_response.first.keys).to match_array expected_keys
end end
end end
   
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment