summaryrefslogtreecommitdiff
path: root/spec/support/shared_examples/graphql/mutations/incident_management/timeline_events_shared_examples.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/shared_examples/graphql/mutations/incident_management/timeline_events_shared_examples.rb')
-rw-r--r--spec/support/shared_examples/graphql/mutations/incident_management/timeline_events_shared_examples.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/support/shared_examples/graphql/mutations/incident_management/timeline_events_shared_examples.rb b/spec/support/shared_examples/graphql/mutations/incident_management/timeline_events_shared_examples.rb
new file mode 100644
index 00000000000..fbfd1af2601
--- /dev/null
+++ b/spec/support/shared_examples/graphql/mutations/incident_management/timeline_events_shared_examples.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+RSpec.shared_examples 'timeline event mutation responds with validation error' do |error_message:|
+ it 'responds with a validation error' do
+ post_graphql_mutation(mutation, current_user: user)
+
+ expect(response).to have_gitlab_http_status(:success)
+ expect(mutation_response['errors']).to match_array([error_message])
+ end
+end