Commit 33955934 authored by James Lopez's avatar James Lopez

fix spec, add json schema

parent fd6dfbec
{
"type": "array",
"required" : [
"project_id",
"last_repository_synced_at",
"last_repository_successful_sync_at",
"last_wiki_synced_at",
"last_wiki_successful_sync_at",
"repository_retry_count",
"wiki_retry_count",
"last_repository_sync_failure",
"last_wiki_sync_failure"
],
"properties" : {
"project_id": { "type": "integer" },
"last_repository_synced_at": { "type": ["string"] },
"last_repository_successful_sync_at": { "type": ["string"] },
"last_wiki_synced_at": { "type": ["string"] },
"last_wiki_successful_sync_at": { "type": ["string"] },
"repository_retry_count": { "type": "integer" },
"wiki_retry_count": { "type": "integer" },
"last_repository_sync_failure": { "type": ["string"] },
"last_wiki_sync_failure": { "type": ["string"] }
},
"additionalProperties": false
}
......@@ -98,13 +98,13 @@ describe API::GeoNodes, :geo, api: true do
get api("/geo_nodes/#{secondary.id}/failures", admin)
expect(response.status).to eq 200
expect(response.body).to eq('')
expect(response).to match_response_schema('geo_project_registry')
end
it 'denies access if not admin' do
get api('/geo_nodes', user)
get api("/geo_nodes/#{secondary.id}/failures", user)
expect(response.failures).to eq 403
expect(response.status).to eq 403
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