# frozen_string_literal: true

require 'spec_helper'

RSpec.describe GitlabSchema.types['VulnerabilityScanner'] do
  let_it_be(:project) { create(:project) }
  let_it_be(:user) { create(:user) }

  let(:fields) do
    %i[name external_id vendor report_type]
  end

  before do
    stub_licensed_features(security_dashboard: true)

    project.add_developer(user)
  end

  subject { GitlabSchema.execute(query, context: { current_user: user }).as_json }

  it { expect(described_class).to have_graphql_fields(fields) }
  it { expect(described_class).to require_graphql_authorizations(:read_vulnerability_scanner) }
end
