2022-08-30 12:12:25 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
RSpec.describe GitlabSchema.types['BranchRule'] do
|
|
|
|
include GraphqlHelpers
|
|
|
|
|
|
|
|
subject { described_class }
|
|
|
|
|
2022-09-09 18:12:57 +00:00
|
|
|
let(:fields) do
|
|
|
|
%i[
|
|
|
|
name
|
2022-10-03 18:08:19 +00:00
|
|
|
isDefault
|
2022-09-09 18:12:57 +00:00
|
|
|
branch_protection
|
|
|
|
created_at
|
|
|
|
updated_at
|
|
|
|
]
|
|
|
|
end
|
2022-08-30 12:12:25 +00:00
|
|
|
|
2022-11-07 18:08:08 +00:00
|
|
|
it { is_expected.to require_graphql_authorizations(:read_protected_branch) }
|
2022-08-30 12:12:25 +00:00
|
|
|
|
2022-11-07 18:08:08 +00:00
|
|
|
it { is_expected.to have_graphql_fields(fields).at_least }
|
2022-08-30 12:12:25 +00:00
|
|
|
end
|