Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-30 15:06:34 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-30 15:06:34 +0300
commit228d752ff09362002cc904d28edee7d63cc3cef2 (patch)
tree63e7ff466c0b0794f67c87c34e874f8682fb5de0 /spec/requests/api/graphql/current_user
parentb539ac1d619c0aafe5988ab8b125a8b43b14d87f (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.rb12
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