diff options
author | GitLab Release Tools Bot <delivery-team+release-tools@gitlab.com> | 2020-11-02 20:03:21 +0300 |
---|---|---|
committer | GitLab Release Tools Bot <delivery-team+release-tools@gitlab.com> | 2020-11-02 20:03:21 +0300 |
commit | 99112fa3868501e82762a50561b999743261733f (patch) | |
tree | 464e01a35aed53a7896be0a016205465300e9caa /spec/models/packages/package_spec.rb | |
parent | 8ee0746f54c19fcb8fe81058594aa8d373c5b7d7 (diff) | |
parent | 187cae1b32bdbb01d70ad09a341dfc372bb559b7 (diff) |
Merge remote-tracking branch 'dev/13-5-stable' into 13-5-stable
Diffstat (limited to 'spec/models/packages/package_spec.rb')
-rw-r--r-- | spec/models/packages/package_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/models/packages/package_spec.rb b/spec/models/packages/package_spec.rb index ca408303524..41a731b87e9 100644 --- a/spec/models/packages/package_spec.rb +++ b/spec/models/packages/package_spec.rb @@ -122,6 +122,21 @@ RSpec.describe Packages::Package, type: :model do it { is_expected.not_to allow_value('my file name').for(:name) } it { is_expected.not_to allow_value('!!().for(:name)().for(:name)').for(:name) } end + + context 'nuget package' do + subject { build_stubbed(:nuget_package) } + + it { is_expected.to allow_value('My.Package').for(:name) } + it { is_expected.to allow_value('My.Package.Mvc').for(:name) } + it { is_expected.to allow_value('MyPackage').for(:name) } + it { is_expected.to allow_value('My.23.Package').for(:name) } + it { is_expected.to allow_value('My23Package').for(:name) } + it { is_expected.to allow_value('runtime.my-test64.runtime.package.Mvc').for(:name) } + it { is_expected.to allow_value('my_package').for(:name) } + it { is_expected.not_to allow_value('My/package').for(:name) } + it { is_expected.not_to allow_value('../../../my_package').for(:name) } + it { is_expected.not_to allow_value('%2e%2e%2fmy_package').for(:name) } + end end describe '#version' do |