Addresses Robert's feedback

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2016-10-11 17:25:57 +02:00
parent 33ce197645
commit 8e70cf2564
No known key found for this signature in database
GPG Key ID: 46DF07E5CD9E96AB
3 changed files with 5 additions and 4 deletions

View File

@ -436,7 +436,7 @@ Parameters:
### Get project events
Get the events for the specified project.
Sorted from newest to latest
Sorted from newest to oldest
```
GET /projects/:id/events

View File

@ -630,7 +630,7 @@ Will return `200 OK` on success, `404 User Not Found` is user cannot be found or
### Get user contribution events
Get the contribution events for the specified user, sorted from newest to latest.
Get the contribution events for the specified user, sorted from newest to oldest.
```
GET /users/:id/events

View File

@ -898,7 +898,6 @@ describe API::API, api: true do
describe 'GET /user/:id/events' do
let(:user) { create(:user) }
let(:lambda_user) { create(:user) }
let(:project) { create(:empty_project) }
let(:note) { create(:note_on_issue, note: 'What an awesome day!', project: project) }
@ -909,7 +908,9 @@ describe API::API, api: true do
context "as a user than cannot see the event's project" do
it 'returns no events' do
get api("/users/#{user.id}/events", lambda_user)
other_user = create(:user)
get api("/users/#{user.id}/events", other_user)
expect(response).to have_http_status(200)
expect(json_response).to be_empty