diff options
Diffstat (limited to 'spec/graphql/types/branch_rule_type_spec.rb')
-rw-r--r-- | spec/graphql/types/branch_rule_type_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/graphql/types/branch_rule_type_spec.rb b/spec/graphql/types/branch_rule_type_spec.rb new file mode 100644 index 00000000000..277901f00bf --- /dev/null +++ b/spec/graphql/types/branch_rule_type_spec.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe GitlabSchema.types['BranchRule'] do + include GraphqlHelpers + + subject { described_class } + + let(:fields) do + %i[ + name + branch_protection + created_at + updated_at + ] + end + + specify { is_expected.to require_graphql_authorizations(:read_protected_branch) } + + specify { is_expected.to have_graphql_fields(fields) } +end |