summaryrefslogtreecommitdiff
path: root/spec/graphql
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-25 15:07:47 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-25 15:07:47 +0000
commit6f2065c468b05658125b746169c56764a8ccddb1 (patch)
tree544a488ae2e65e2fcfe4acce4e56623b85bbce5e /spec/graphql
parente6baeabaa9651d90b03bb64ffce75a2c3cb89aab (diff)
downloadgitlab-ce-6f2065c468b05658125b746169c56764a8ccddb1.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/graphql')
-rw-r--r--spec/graphql/mutations/concerns/mutations/resolves_issuable_spec.rb6
-rw-r--r--spec/graphql/resolvers/merge_requests_resolver_spec.rb6
2 files changed, 12 insertions, 0 deletions
diff --git a/spec/graphql/mutations/concerns/mutations/resolves_issuable_spec.rb b/spec/graphql/mutations/concerns/mutations/resolves_issuable_spec.rb
index 69db8d016d7..75b5d31d134 100644
--- a/spec/graphql/mutations/concerns/mutations/resolves_issuable_spec.rb
+++ b/spec/graphql/mutations/concerns/mutations/resolves_issuable_spec.rb
@@ -59,6 +59,12 @@ describe Mutations::ResolvesIssuable do
expect(result).to be_nil
end
+
+ it 'returns nil if parent path is empty' do
+ result = mutation.resolve_issuable(type: type, parent_path: "", iid: issuable.iid)
+
+ expect(result).to be_nil
+ end
end
end
diff --git a/spec/graphql/resolvers/merge_requests_resolver_spec.rb b/spec/graphql/resolvers/merge_requests_resolver_spec.rb
index 0bd5043d855..4217d257ab3 100644
--- a/spec/graphql/resolvers/merge_requests_resolver_spec.rb
+++ b/spec/graphql/resolvers/merge_requests_resolver_spec.rb
@@ -52,6 +52,12 @@ describe Resolvers::MergeRequestsResolver do
expect(result).to be_empty
end
+
+ it 'resolves an unknown project to be empty' do
+ result = batch_sync { resolve_mr(nil, iid: iid_1) }
+
+ expect(result.compact).to be_empty
+ end
end
def resolve_mr(project, args)