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

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

22 lines
527 B
Ruby
Raw Normal View History

2021-03-08 18:12:59 +05:30
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Resolvers::PackageDetailsResolver do
include GraphqlHelpers
let_it_be_with_reload(:project) { create(:project) }
2022-04-04 11:22:00 +05:30
let_it_be(:user) { project.first_owner }
2021-03-08 18:12:59 +05:30
let_it_be(:package) { create(:composer_package, project: project) }
describe '#resolve' do
let(:args) do
2021-03-11 19:13:27 +05:30
{ id: global_id_of(package) }
2021-03-08 18:12:59 +05:30
end
2021-03-11 19:13:27 +05:30
subject { force(resolve(described_class, ctx: { current_user: user }, args: args)) }
2021-03-08 18:12:59 +05:30
it { is_expected.to eq(package) }
end
end