debian-mirror-gitlab/spec/finders/packages/composer/packages_finder_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
814 B
Ruby
Raw Permalink Normal View History

2021-06-08 01:23:25 +05:30
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe ::Packages::Composer::PackagesFinder do
let_it_be(:user) { create(:user) }
let_it_be(:group) { create(:group) }
let_it_be(:project) { create(:project, group: group) }
let(:params) { {} }
describe '#execute' do
let_it_be(:composer_package) { create(:composer_package, project: project) }
let_it_be(:composer_package2) { create(:composer_package, project: project) }
let_it_be(:error_package) { create(:composer_package, :error, project: project) }
let_it_be(:composer_package3) { create(:composer_package) }
subject { described_class.new(user, group, params).execute }
before do
project.add_developer(user)
end
it { is_expected.to match_array([composer_package, composer_package2]) }
end
end