diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /spec/finders/packages/go | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'spec/finders/packages/go')
-rw-r--r-- | spec/finders/packages/go/package_finder_spec.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/finders/packages/go/package_finder_spec.rb b/spec/finders/packages/go/package_finder_spec.rb index b6fad1e7061..dbcb8255d47 100644 --- a/spec/finders/packages/go/package_finder_spec.rb +++ b/spec/finders/packages/go/package_finder_spec.rb @@ -7,7 +7,7 @@ RSpec.describe Packages::Go::PackageFinder do let_it_be(:mod) { create :go_module, project: project } let_it_be(:version) { create :go_module_version, :tagged, mod: mod, name: 'v1.0.1' } - let_it_be(:package) { create :golang_package, project: project, name: mod.name, version: 'v1.0.1' } + let_it_be_with_refind(:package) { create :golang_package, project: project, name: mod.name, version: 'v1.0.1' } let(:finder) { described_class.new(project, mod_name, version_name) } @@ -54,6 +54,17 @@ RSpec.describe Packages::Go::PackageFinder do it { is_expected.to eq(package) } end + context 'with an uninstallable package' do + let(:mod_name) { mod.name } + let(:version_name) { version.name } + + before do + package.update_column(:status, 1) + end + + it { is_expected.to eq(nil) } + end + context 'with an invalid name' do let(:mod_name) { 'foo/bar' } let(:version_name) { 'baz' } |