{
  "schema": "https://bars.commonsware.com/conformance/schema/render-fixture.schema.json",
  "version": "0.1.0",
  "cases": [
    {
      "name": "format_date_time-no-args-iso8601",
      "spotlight": true,
      "description": "format_date_time with no args renders ISO 8601 in UTC.",
      "template": "{{ ts | as_date_time: 'seconds' | format_date_time }}",
      "context": {
        "ts": 2
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "1970-01-01T00:00:02Z"
      }
    },
    {
      "name": "format_date_time-iso8601",
      "description": "format_date_time with 'iso8601' renders ISO 8601 in UTC.",
      "template": "{{ ts | as_date_time: 'seconds' | format_date_time: 'iso8601' }}",
      "context": {
        "ts": 2
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "1970-01-01T00:00:02Z"
      }
    },
    {
      "name": "format_date_time-rfc3339",
      "description": "format_date_time with 'rfc3339' renders ISO 8601 in UTC.",
      "template": "{{ ts | as_date_time: 'seconds' | format_date_time: 'rfc3339' }}",
      "context": {
        "ts": 2
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "1970-01-01T00:00:02Z"
      }
    },
    {
      "name": "format_date_time-explicit-timezone",
      "spotlight": true,
      "description": "format_date_time with an explicit time zone shifts the rendered offset.",
      "template": "{{ ts | as_date_time: 'seconds' | format_date_time: 'iso8601' 'UTC-05:00' }}",
      "context": {
        "ts": 0
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "1969-12-31T19:00:00-05:00"
      }
    },
    {
      "name": "format_date_time-rfc1123",
      "description": "format_date_time with 'rfc1123' renders an RFC 1123 string in UTC.",
      "template": "{{ ts | as_date_time: 'seconds' | format_date_time: 'rfc1123' }}",
      "context": {
        "ts": 2
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "Thu, 1 Jan 1970 00:00:02 GMT"
      }
    },
    {
      "name": "format_date_time-rfc2822",
      "description": "format_date_time with 'rfc2822' renders an RFC 1123-format string in UTC.",
      "template": "{{ ts | as_date_time: 'seconds' | format_date_time: 'rfc2822' }}",
      "context": {
        "ts": 2
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "Thu, 1 Jan 1970 00:00:02 GMT"
      }
    },
    {
      "name": "format_date_time-unicode-pattern",
      "description": "format_date_time with a Unicode pattern renders that pattern in UTC.",
      "template": "{{ ts | as_date_time: 'seconds' | format_date_time: 'MM/dd/uuuu HH:mm:ss' }}",
      "context": {
        "ts": 5
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "01/01/1970 00:00:05"
      }
    },
    {
      "name": "format_date_time-non-datetime-input-is-null",
      "description": "format_date_time returns null when the input is not a DateTime.",
      "template": "{{ s | format_date_time }}",
      "context": {
        "s": "hello"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "null"
      }
    },
    {
      "name": "format_date_time-invalid-timezone-is-null",
      "description": "An invalid time zone identifier is a soft failure, so format_date_time yields null.",
      "template": "{{ ts | as_date_time: 'seconds' | format_date_time: 'iso8601' 'Not/AZone' }}",
      "context": {
        "ts": 0
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "null"
      }
    },
    {
      "name": "format_date_time-invalid-unicode-pattern-is-null",
      "description": "An invalid Unicode format pattern is a soft failure, so format_date_time yields null.",
      "template": "{{ ts | as_date_time: 'seconds' | format_date_time: 'G' }}",
      "context": {
        "ts": 0
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "null"
      }
    },
    {
      "name": "format_date_time-too-many-args-is-error",
      "description": "format_date_time throws when given more than two arguments.",
      "template": "{{ ts | as_date_time: 'seconds' | format_date_time: 'iso8601' 'UTC' 'extra' }}",
      "context": {
        "ts": 0
      },
      "expect": {
        "kind": "error",
        "errorCode": "KB-2002"
      }
    }
  ]
}
