{
  "schema": "https://bars.commonsware.com/conformance/schema/render-fixture.schema.json",
  "version": "0.1.0",
  "cases": [
    {
      "name": "at_most-caps-to-maximum",
      "spotlight": true,
      "description": "at_most returns the argument when the input is above it via {{ n | at_most: 5 }}.",
      "template": "{{ n | at_most: 5 }}",
      "context": {
        "n": 8
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "5"
      }
    },
    {
      "name": "at_most-keeps-smaller-input",
      "spotlight": true,
      "description": "at_most returns the input when it is already at or below the maximum.",
      "template": "{{ n | at_most: 5 }}",
      "context": {
        "n": 3
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "3"
      }
    },
    {
      "name": "at_most-fractional-maximum",
      "description": "at_most returns a fractional maximum when it is the smaller value.",
      "template": "{{ n | at_most: 2.5 }}",
      "context": {
        "n": 4
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "2.5"
      }
    },
    {
      "name": "at_most-non-numeric-input-is-null",
      "description": "A non-numeric input is a soft failure, so at_most yields null.",
      "template": "{{ n | at_most: 5 }}",
      "context": {
        "n": "x"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "null"
      }
    },
    {
      "name": "at_most-non-numeric-argument-is-null",
      "description": "A non-numeric argument is a soft failure, so at_most yields null.",
      "template": "{{ n | at_most: \"x\" }}",
      "context": {
        "n": 5
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "null"
      }
    },
    {
      "name": "at_most-zero-args-is-error",
      "description": "Calling at_most with zero arguments produces an arity error.",
      "template": "{{ n | at_most }}",
      "context": {
        "n": 5
      },
      "expect": {
        "kind": "error",
        "errorCode": "KB-2002"
      }
    },
    {
      "name": "at_most-datetime-keeps-earlier-argument",
      "description": "With DateTime input and a DateTime argument, at_most returns the earlier instant.",
      "template": "{{ a | as_date_time: 'seconds' | at_most: ( b | as_date_time: 'seconds' ) }}",
      "context": {
        "a": 500,
        "b": 200
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "1970-01-01T00:03:20Z"
      }
    },
    {
      "name": "at_most-datetime-keeps-earlier-input",
      "description": "With DateTime input and a DateTime argument, at_most returns the input when it is the earlier instant.",
      "template": "{{ a | as_date_time: 'seconds' | at_most: ( b | as_date_time: 'seconds' ) }}",
      "context": {
        "a": 100,
        "b": 200
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "1970-01-01T00:01:40Z"
      }
    },
    {
      "name": "at_most-datetime-non-datetime-argument-is-null",
      "description": "DateTime input with a non-DateTime argument is a soft failure, so at_most yields null.",
      "template": "{{ a | as_date_time: 'seconds' | at_most: 5 }}",
      "context": {
        "a": 100
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "null"
      }
    }
  ]
}
