diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2016-06-10 12:24:38 +0200 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2016-07-01 10:49:34 +0200 |
commit | f3abd18c9c7da9c53bea2f08c2326a15ba5948f3 (patch) | |
tree | 894908354ef48c79818412be6d9b1c872b8f28c8 | |
parent | 39e6f504fcb8c6cab511a50cdefd76e821bfec17 (diff) | |
download | gitlab-ce-f3abd18c9c7da9c53bea2f08c2326a15ba5948f3.tar.gz |
Add user to project to see todos
-rw-r--r-- | lib/api/entities.rb | 2 | ||||
-rw-r--r-- | spec/requests/api/todos_spec.rb | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 67d2c396b32..88f7fc7ff6c 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -276,7 +276,7 @@ module API expose :id expose :project, using: Entities::BasicProjectDetails expose :author, using: Entities::UserBasic - expose :action_name + #expose :action_name expose :target_id expose :target_type expose :target_reference do |todo, options| diff --git a/spec/requests/api/todos_spec.rb b/spec/requests/api/todos_spec.rb index 7ad6d26c42f..147028ba1c9 100644 --- a/spec/requests/api/todos_spec.rb +++ b/spec/requests/api/todos_spec.rb @@ -14,6 +14,11 @@ describe API::Todos, api: true do let!(:pending_3) { create(:todo, project: project_1, author: author_2, user: john_doe, target: merge_request) } let!(:done) { create(:todo, :done, project: project_1, author: author_1, user: john_doe) } + before do + project_1.team << [john_doe, :developer] + project_2.team << [john_doe, :developer] + end + describe 'GET /todos' do context 'when unauthenticated' do it 'returns authentication error' do |