project_type_spec.rb 670 字节
Newer Older
1 2 3
require 'spec_helper'

describe GitlabSchema.types['Project'] do
4 5
  it { expect(described_class).to expose_permissions_using(Types::PermissionTypes::Project) }

6
  it { expect(described_class.graphql_name).to eq('Project') }
7 8 9 10 11 12

  describe 'nested merge request' do
    it { expect(described_class).to have_graphql_field(:merge_request) }

    it 'authorizes the merge request' do
      expect(described_class.fields['mergeRequest'])
13
        .to require_graphql_authorizations(:read_merge_request)
14 15
    end
  end
B
Bob Van Landuyt 已提交
16

P
Phil Hughes 已提交
17 18 19 20
  describe 'nested issues' do
    it { expect(described_class).to have_graphql_field(:issues) }
  end

B
Bob Van Landuyt 已提交
21
  it { is_expected.to have_graphql_field(:pipelines) }
22
end