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

name: ReferenceTransactionTypeTestSuite
description: Test for verifying reference_transaction_type resource policies
tests:
  - name: Viewing a reference transaction type
    input:
      principals:
        - rob
        - ciara
        - max
        - gab
      resources:
        - reference_transaction_type
      actions:
        - view
    expected:
      - principal: rob
        resource: reference_transaction_type
        actions:
          view: EFFECT_DENY
      - principal: ciara
        resource: reference_transaction_type
        actions:
          view: EFFECT_ALLOW
      - principal: max
        resource: reference_transaction_type
        actions:
          view: EFFECT_ALLOW
      - principal: gab
        resource: reference_transaction_type
        actions:
          view: EFFECT_ALLOW
