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

name: AccountingPeriodTestSuite
description: Test for verifying accounting_period resource policies
tests:
  - name: Viewing an accounting period
    input:
      principals:
        - rob
        - ciara
        - max
        - gab
      resources:
        - accounting_period_december_2033
      actions:
        - view
    expected:
      - principal: rob
        resource: accounting_period_december_2033
        actions:
          view: EFFECT_DENY
      - principal: ciara
        resource: accounting_period_december_2033
        actions:
          view: EFFECT_ALLOW
      - principal: max
        resource: accounting_period_december_2033
        actions:
          view: EFFECT_ALLOW
      - principal: gab
        resource: accounting_period_december_2033
        actions:
          view: EFFECT_ALLOW
