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

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