suite: Controller > ConfigMap
templates:
  - controller-configmap.yaml

tests:
  - it: should create a ConfigMap
    asserts:
      - hasDocuments:
          count: 1
      - isKind:
          of: ConfigMap
      - equal:
          path: metadata.name
          value: RELEASE-NAME-ingress-nginx-controller

  - it: should create a ConfigMap with templated values if `controller.config` contains templates
    set:
      controller.config:
        template: "test.{{ .Release.Namespace }}.svc.kubernetes.local"
        integer: 12345
        boolean: true
    asserts:
      - equal:
          path: data.template
          value: test.NAMESPACE.svc.kubernetes.local
      - equal:
          path: data.integer
          value: "12345"
      - equal:
          path: data.boolean
          value: "true"
