diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
commit | 0ea3fcec397b69815975647f5e2aa5fe944a8486 (patch) | |
tree | 7979381b89d26011bcf9bdc989a40fcc2f1ed4ff /spec/graphql/mutations/ci/runner/update_spec.rb | |
parent | 72123183a20411a36d607d70b12d57c484394c8e (diff) |
Add latest changes from gitlab-org/gitlab@15-1-stable-eev15.1.0-rc42
Diffstat (limited to 'spec/graphql/mutations/ci/runner/update_spec.rb')
-rw-r--r-- | spec/graphql/mutations/ci/runner/update_spec.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/graphql/mutations/ci/runner/update_spec.rb b/spec/graphql/mutations/ci/runner/update_spec.rb index 75e9b57e60a..ffaa6e93d1b 100644 --- a/spec/graphql/mutations/ci/runner/update_spec.rb +++ b/spec/graphql/mutations/ci/runner/update_spec.rb @@ -2,11 +2,12 @@ require 'spec_helper' -RSpec.describe Mutations::Ci::Runner::Update do +RSpec.describe 'Mutations::Ci::Runner::Update' do include GraphqlHelpers let_it_be(:user) { create(:user) } let_it_be(:runner) { create(:ci_runner, active: true, locked: false, run_untagged: true) } + let_it_be(:described_class) { Mutations::Ci::Runner::Update } let(:current_ctx) { { current_user: user } } let(:mutated_runner) { subject[:runner] } @@ -49,6 +50,7 @@ RSpec.describe Mutations::Ci::Runner::Update do { id: runner.to_global_id, description: 'updated description', + maintenance_note: 'updated maintenance note', maximum_timeout: 900, access_level: 'ref_protected', active: false, @@ -84,6 +86,16 @@ RSpec.describe Mutations::Ci::Runner::Update do ) end end + + context 'with too long maintenance note' do + it 'returns a descriptive error' do + mutation_params[:maintenance_note] = '1' * 1025 + + expect(subject[:errors]).to contain_exactly( + 'Maintenance note is too long (maximum is 1024 characters)' + ) + end + end end end end |