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

21 lines
482 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-06-08 01:23:25 +05:30
let_it_be_with_reload(:project) { create(:project, :public) }
let(:args) do
{ sort: :created_desc }
end
2020-07-28 23:09:34 +05:30
describe '#resolve' do
2021-06-08 01:23:25 +05:30
subject { resolve(described_class, ctx: { current_user: user }, obj: project, args: args).to_a }
2020-07-28 23:09:34 +05:30
2021-06-08 01:23:25 +05:30
it_behaves_like 'group and projects packages resolver'
2020-07-28 23:09:34 +05:30
end
end