Add user to project to see todos
This commit is contained in:
parent
39e6f504fc
commit
f3abd18c9c
2 changed files with 6 additions and 1 deletions
|
@ -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|
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue