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

name: StatementPeriodTestSuite
description: Test for verifying statement_period resource policies
tests:
  - name: Viewing a statement period
    input:
      principals:
        - rob
        - ciara
        - max
        - gab
      resources:
        - statement_period_december_2033
      actions:
        - view
    expected:
      - principal: rob
        resource: statement_period_december_2033
        actions:
          view: EFFECT_DENY
      - principal: ciara
        resource: statement_period_december_2033
        actions:
          view: EFFECT_ALLOW
      - principal: max
        resource: statement_period_december_2033
        actions:
          view: EFFECT_ALLOW
      - principal: gab
        resource: statement_period_december_2033
        actions:
          view: EFFECT_ALLOW
