diff options
Diffstat (limited to 'spec/graphql/types/merge_request_type_spec.rb')
-rw-r--r-- | spec/graphql/types/merge_request_type_spec.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/graphql/types/merge_request_type_spec.rb b/spec/graphql/types/merge_request_type_spec.rb index b11951190e0..46aebbdabeb 100644 --- a/spec/graphql/types/merge_request_type_spec.rb +++ b/spec/graphql/types/merge_request_type_spec.rb @@ -9,6 +9,8 @@ RSpec.describe GitlabSchema.types['MergeRequest'] do specify { expect(described_class.interfaces).to include(Types::Notes::NoteableType) } + specify { expect(described_class.interfaces).to include(Types::CurrentUserTodos) } + it 'has the expected fields' do expected_fields = %w[ notes discussions user_permissions id iid title title_html description @@ -24,10 +26,16 @@ RSpec.describe GitlabSchema.types['MergeRequest'] do source_branch_exists target_branch_exists upvotes downvotes head_pipeline pipelines task_completion_status milestone assignees participants subscribed labels discussion_locked time_estimate - total_time_spent reference author merged_at commit_count + total_time_spent reference author merged_at commit_count current_user_todos + conflicts auto_merge_enabled ] - expected_fields << 'approved_by' if Gitlab.ee? + if Gitlab.ee? + expected_fields << 'approved' + expected_fields << 'approvals_left' + expected_fields << 'approvals_required' + expected_fields << 'approved_by' + end expect(described_class).to have_graphql_fields(*expected_fields) end |