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.rb8
1 files changed, 6 insertions, 2 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 522211340ea..24c8a247c93 100644
--- a/spec/support/shared_examples/graphql/notes_creation_shared_examples.rb
+++ b/spec/support/shared_examples/graphql/notes_creation_shared_examples.rb
@@ -52,11 +52,15 @@ RSpec.shared_examples 'a Note mutation when the given resource id is not for a N
it_behaves_like 'a Note mutation that does not create a Note'
- it_behaves_like 'a mutation that returns top-level errors', errors: ['Cannot add notes to this resource']
+ it_behaves_like 'a mutation that returns top-level errors' do
+ let(:match_errors) { include(/ does not represent an instance of Noteable/) }
+ end
end
RSpec.shared_examples 'a Note mutation when the given resource id is not for a Note' do
let(:note) { create(:issue) }
- it_behaves_like 'a mutation that returns top-level errors', errors: ['Resource is not a note']
+ it_behaves_like 'a mutation that returns top-level errors' do
+ let(:match_errors) { include(/does not represent an instance of Note/) }
+ end
end