diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-30 15:06:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-30 15:06:34 +0300 |
commit | 228d752ff09362002cc904d28edee7d63cc3cef2 (patch) | |
tree | 63e7ff466c0b0794f67c87c34e874f8682fb5de0 /spec/requests/api/graphql/current_user | |
parent | b539ac1d619c0aafe5988ab8b125a8b43b14d87f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/api/graphql/current_user')
-rw-r--r-- | spec/requests/api/graphql/current_user/todos_query_spec.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/requests/api/graphql/current_user/todos_query_spec.rb b/spec/requests/api/graphql/current_user/todos_query_spec.rb index 6817e37e64b..82deba0d92c 100644 --- a/spec/requests/api/graphql/current_user/todos_query_spec.rb +++ b/spec/requests/api/graphql/current_user/todos_query_spec.rb @@ -13,7 +13,7 @@ describe 'Query current user todos' do let(:fields) do <<~QUERY nodes { - id + #{all_graphql_fields_for('todos'.classify)} } QUERY end @@ -28,6 +28,8 @@ describe 'Query current user todos' do post_graphql(query, current_user: current_user) end + it_behaves_like 'a working graphql query' + it 'contains the expected ids' do is_expected.to include( a_hash_including('id' => commit_todo.to_global_id.to_s), @@ -35,4 +37,12 @@ describe 'Query current user todos' do a_hash_including('id' => merge_request_todo.to_global_id.to_s) ) end + + it 'returns Todos for all target types' do + is_expected.to include( + a_hash_including('targetType' => 'COMMIT'), + a_hash_including('targetType' => 'ISSUE'), + a_hash_including('targetType' => 'MERGEREQUEST') + ) + end end |