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

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