debian-mirror-gitlab/spec/finders/packages/package_finder_spec.rb

26 lines
735 B
Ruby
Raw Normal View History

2020-07-28 23:09:34 +05:30
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe ::Packages::PackageFinder do
let_it_be(:project) { create(:project) }
let_it_be(:maven_package) { create(:maven_package, project: project) }
describe '#execute' do
let(:package_id) { maven_package.id }
subject { described_class.new(project, package_id).execute }
it { is_expected.to eq(maven_package) }
context 'processing packages' do
2021-04-17 20:07:23 +05:30
let_it_be(:nuget_package) { create(:nuget_package, project: project, name: Packages::Nuget::TEMPORARY_PACKAGE_NAME) }
2020-07-28 23:09:34 +05:30
let(:package_id) { nuget_package.id }
it 'are not returned' do
expect { subject }.to raise_exception(ActiveRecord::RecordNotFound)
end
end
end
end