summaryrefslogtreecommitdiff
path: root/spec/support/matchers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-10 12:07:55 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-10 12:07:55 +0000
commit5e11c9b77cb1b2b77ee29359047b55807afe255d (patch)
tree40b02dead6acdcaab9cc15efc9ae4710c2ed78a8 /spec/support/matchers
parent97d4d926630822d0e1a638206909679c962d2f0a (diff)
downloadgitlab-ce-5e11c9b77cb1b2b77ee29359047b55807afe255d.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/matchers')
-rw-r--r--spec/support/matchers/graphql_matchers.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/support/matchers/graphql_matchers.rb b/spec/support/matchers/graphql_matchers.rb
index d735c10f698..ebba5d8a73c 100644
--- a/spec/support/matchers/graphql_matchers.rb
+++ b/spec/support/matchers/graphql_matchers.rb
@@ -64,6 +64,12 @@ RSpec::Matchers.define :have_graphql_type do |expected|
end
end
+RSpec::Matchers.define :have_non_null_graphql_type do |expected|
+ match do |field|
+ expect(field.type).to eq(!expected.to_graphql)
+ end
+end
+
RSpec::Matchers.define :have_graphql_resolver do |expected|
match do |field|
case expected