summaryrefslogtreecommitdiff
path: root/spec/requests/api/graphql/project/issue/notes_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/api/graphql/project/issue/notes_spec.rb')
-rw-r--r--spec/requests/api/graphql/project/issue/notes_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/requests/api/graphql/project/issue/notes_spec.rb b/spec/requests/api/graphql/project/issue/notes_spec.rb
new file mode 100644
index 00000000000..bfc89434370
--- /dev/null
+++ b/spec/requests/api/graphql/project/issue/notes_spec.rb
@@ -0,0 +1,24 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+describe 'getting notes for an issue' do
+ include GraphqlHelpers
+
+ let(:noteable) { create(:issue) }
+ let(:noteable_data) { graphql_data['project']['issue'] }
+
+ def noteable_query(noteable_fields)
+ <<~QRY
+ {
+ project(fullPath: "#{noteable.project.full_path}") {
+ issue(iid: "#{noteable.iid}") {
+ #{noteable_fields}
+ }
+ }
+ }
+ QRY
+ end
+
+ it_behaves_like 'exposing regular notes on a noteable in GraphQL'
+end