# yaml-language-server: $schema=https://api.cerbos.dev/latest/cerbos/policy/v1/TestSuite.schema.json
---
resources:
  some_reference_payment_type:
    id: "some_reference_payment_type"
    kind: "reference_payment_type"

name: ReferencePaymentTypeTestSuite
description: Test for verifying reference_payment_type resource policies
tests:
  - name: Viewing a reference_payment_type
    input:
      principals:
        - rob
        - ciara
        - max
        - gab
      resources:
        - some_reference_payment_type
      actions:
        - view
    expected:
      - principal: rob
        resource: some_reference_payment_type
        actions:
          view: EFFECT_DENY
      - principal: ciara
        resource: some_reference_payment_type
        actions:
          view: EFFECT_ALLOW
      - principal: max
        resource: some_reference_payment_type
        actions:
          view: EFFECT_ALLOW
      - principal: gab
        resource: some_reference_payment_type
        actions:
          view: EFFECT_ALLOW
