summaryrefslogtreecommitdiff
path: root/spec/graphql/mutations/ci/runner/delete_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/graphql/mutations/ci/runner/delete_spec.rb')
-rw-r--r--spec/graphql/mutations/ci/runner/delete_spec.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/graphql/mutations/ci/runner/delete_spec.rb b/spec/graphql/mutations/ci/runner/delete_spec.rb
index c0f979e43cc..ee640b21918 100644
--- a/spec/graphql/mutations/ci/runner/delete_spec.rb
+++ b/spec/graphql/mutations/ci/runner/delete_spec.rb
@@ -37,7 +37,9 @@ RSpec.describe Mutations::Ci::Runner::Delete do
it 'raises an error' do
mutation_params[:id] = two_projects_runner.to_global_id
- expect { subject }.to raise_error(Gitlab::Graphql::Errors::ResourceNotAvailable)
+ expect_graphql_error_to_be_created(Gitlab::Graphql::Errors::ResourceNotAvailable) do
+ subject
+ end
end
end
end
@@ -115,7 +117,10 @@ RSpec.describe Mutations::Ci::Runner::Delete do
allow_next_instance_of(::Ci::Runners::UnregisterRunnerService) do |service|
expect(service).not_to receive(:execute)
end
- expect { subject }.to raise_error(Gitlab::Graphql::Errors::ResourceNotAvailable)
+
+ expect_graphql_error_to_be_created(Gitlab::Graphql::Errors::ResourceNotAvailable) do
+ subject
+ end
end
end
end