diff options
Diffstat (limited to 'spec/graphql/mutations/release_asset_links/update_spec.rb')
-rw-r--r-- | spec/graphql/mutations/release_asset_links/update_spec.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/spec/graphql/mutations/release_asset_links/update_spec.rb b/spec/graphql/mutations/release_asset_links/update_spec.rb index 64648687336..e119cf9cc77 100644 --- a/spec/graphql/mutations/release_asset_links/update_spec.rb +++ b/spec/graphql/mutations/release_asset_links/update_spec.rb @@ -186,18 +186,12 @@ RSpec.describe Mutations::ReleaseAssetLinks::Update do end context "when the link doesn't exist" do - let(:mutation_arguments) { super().merge(id: "gid://gitlab/Releases::Link/#{non_existing_record_id}") } - - it 'raises an error' do - expect { subject }.to raise_error(Gitlab::Graphql::Errors::ResourceNotAvailable) + let(:mutation_arguments) do + super().merge(id: global_id_of(id: non_existing_record_id, model_name: "Releases::Link")) end - end - - context "when the provided ID is invalid" do - let(:mutation_arguments) { super().merge(id: 'not-a-valid-gid') } it 'raises an error' do - expect { subject }.to raise_error(::GraphQL::CoercionError) + expect { subject }.to raise_error(Gitlab::Graphql::Errors::ResourceNotAvailable) end end end |