debian-mirror-gitlab/spec/graphql/resolvers/project_packages_resolver_spec.rb

18 lines
466 B
Ruby
Raw Normal View History

2020-07-28 23:09:34 +05:30
# frozen_string_literal: true
require 'spec_helper'
2021-04-17 20:07:23 +05:30
RSpec.describe Resolvers::ProjectPackagesResolver do
2020-07-28 23:09:34 +05:30
include GraphqlHelpers
let_it_be(:user) { create(:user) }
2021-03-11 19:13:27 +05:30
let_it_be(:project) { create(:project, :public) }
2020-07-28 23:09:34 +05:30
let_it_be(:package) { create(:package, project: project) }
describe '#resolve' do
subject(:packages) { resolve(described_class, ctx: { current_user: user }, obj: project) }
it { is_expected.to contain_exactly(package) }
end
end