diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
commit | 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch) | |
tree | 544930fb309b30317ae9797a9683768705d664c4 /spec/graphql/mutations/boards/lists/create_spec.rb | |
parent | 4b1de649d0168371549608993deac953eb692019 (diff) |
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'spec/graphql/mutations/boards/lists/create_spec.rb')
-rw-r--r-- | spec/graphql/mutations/boards/lists/create_spec.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/graphql/mutations/boards/lists/create_spec.rb b/spec/graphql/mutations/boards/lists/create_spec.rb index b1fe9911c7b..894dd1f34b4 100644 --- a/spec/graphql/mutations/boards/lists/create_spec.rb +++ b/spec/graphql/mutations/boards/lists/create_spec.rb @@ -23,12 +23,12 @@ RSpec.describe Mutations::Boards::Lists::Create do describe '#ready?' do it 'raises an error if required arguments are missing' do - expect { mutation.ready?({ board_id: 'some id' }) } + expect { mutation.ready?(board_id: 'some id') } .to raise_error(Gitlab::Graphql::Errors::ArgumentError, /one and only one of/) end it 'raises an error if too many required arguments are specified' do - expect { mutation.ready?({ board_id: 'some id', backlog: true, label_id: 'some label' }) } + expect { mutation.ready?(board_id: 'some id', backlog: true, label_id: 'some label') } .to raise_error(Gitlab::Graphql::Errors::ArgumentError, /one and only one of/) end end @@ -68,9 +68,8 @@ RSpec.describe Mutations::Boards::Lists::Create do context 'when label not found' do let(:list_create_params) { { label_id: "gid://gitlab/Label/#{non_existing_record_id}" } } - it 'raises an error' do - expect { subject } - .to raise_error(Gitlab::Graphql::Errors::ArgumentError, 'Label not found!') + it 'returns an error' do + expect(subject[:errors]).to include 'Label not found' end end end |