2020-07-17 02:09:11 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2021-03-05 16:09:03 -05:00
|
|
|
RSpec.describe Resolvers::ProjectPackagesResolver do
|
2020-07-17 02:09:11 -04:00
|
|
|
include GraphqlHelpers
|
|
|
|
|
|
|
|
let_it_be(:user) { create(:user) }
|
2021-02-09 07:09:48 -05:00
|
|
|
let_it_be(:project) { create(:project, :public) }
|
2020-07-17 02:09:11 -04:00
|
|
|
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
|