summaryrefslogtreecommitdiff
path: root/spec/support/shared_examples/graphql/notes_creation_shared_examples.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/shared_examples/graphql/notes_creation_shared_examples.rb')
-rw-r--r--spec/support/shared_examples/graphql/notes_creation_shared_examples.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/support/shared_examples/graphql/notes_creation_shared_examples.rb b/spec/support/shared_examples/graphql/notes_creation_shared_examples.rb
index 56b6dc682eb..2c6118779e6 100644
--- a/spec/support/shared_examples/graphql/notes_creation_shared_examples.rb
+++ b/spec/support/shared_examples/graphql/notes_creation_shared_examples.rb
@@ -85,3 +85,14 @@ RSpec.shared_examples 'a Note mutation when there are rate limit validation erro
end
end
end
+
+RSpec.shared_examples 'a Note mutation with confidential notes' do
+ it_behaves_like 'a Note mutation that creates a Note'
+
+ it 'returns a Note with confidentiality enabled' do
+ post_graphql_mutation(mutation, current_user: current_user)
+
+ expect(mutation_response).to have_key('note')
+ expect(mutation_response['note']['confidential']).to eq(true)
+ end
+end