2019-04-17 23:43:19 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 09:08:32 +00:00
|
|
|
RSpec.describe GitlabSchema.types['Namespace'] do
|
2020-05-07 06:09:38 +00:00
|
|
|
specify { expect(described_class.graphql_name).to eq('Namespace') }
|
2019-05-12 21:10:46 +00:00
|
|
|
|
2019-06-20 08:02:33 +00:00
|
|
|
it 'has the expected fields' do
|
|
|
|
expected_fields = %w[
|
|
|
|
id name path full_name full_path description description_html visibility
|
2020-07-09 12:08:56 +00:00
|
|
|
lfs_enabled request_access_enabled projects root_storage_statistics
|
2019-06-20 08:02:33 +00:00
|
|
|
]
|
|
|
|
|
2020-07-09 12:08:56 +00:00
|
|
|
expect(described_class).to include_graphql_fields(*expected_fields)
|
2019-06-20 08:02:33 +00:00
|
|
|
end
|
2019-06-18 16:31:06 +00:00
|
|
|
|
2020-05-07 06:09:38 +00:00
|
|
|
specify { expect(described_class).to require_graphql_authorizations(:read_namespace) }
|
2019-04-17 23:43:19 +00:00
|
|
|
end
|