diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-14 00:10:39 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-14 00:10:39 +0300 |
commit | 75f2fd2ba85fea64ee1a42f704c4872282f55eb5 (patch) | |
tree | faddaa823afeeffdc82b18af06018d9c1b8bad94 /spec/services | |
parent | e62d575077d6265497d7bbc7a31548ab15908a9e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/packages/npm/create_package_service_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/services/packages/npm/create_package_service_spec.rb b/spec/services/packages/npm/create_package_service_spec.rb index d0fca2a5f08..8b94bce6650 100644 --- a/spec/services/packages/npm/create_package_service_spec.rb +++ b/spec/services/packages/npm/create_package_service_spec.rb @@ -69,7 +69,7 @@ RSpec.describe Packages::Npm::CreatePackageService, feature_category: :package_r field_sizes: expected_field_sizes ) - expect { subject }.to raise_error(ActiveRecord::RecordInvalid, 'Validation failed: Package json structure is too large') + expect { subject }.to raise_error(ActiveRecord::RecordInvalid, /structure is too large/) .and not_change { Packages::Package.count } .and not_change { Packages::Package.npm.count } .and not_change { Packages::Tag.count } @@ -296,7 +296,7 @@ RSpec.describe Packages::Npm::CreatePackageService, feature_category: :package_r end with_them do - it { expect { subject }.to raise_error(ActiveRecord::RecordInvalid, 'Validation failed: Version is invalid') } + it { expect { subject }.to raise_error(ActiveRecord::RecordInvalid, "Validation failed: Version #{Gitlab::Regex.semver_regex_message}") } end end @@ -319,7 +319,7 @@ RSpec.describe Packages::Npm::CreatePackageService, feature_category: :package_r end it { expect(subject[:http_status]).to eq 400 } - it { expect(subject[:message]).to eq 'Could not obtain package lease.' } + it { expect(subject[:message]).to eq 'Could not obtain package lease. Please try again.' } end context 'when many of the same packages are created at the same time', :delete do |