summaryrefslogtreecommitdiff
path: root/test/integration/targets/tests/tasks/main.yml
blob: 739675066cee769e6773753281004e1c4b905998 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
- name: Assert truthy tests work
  assert:
    that:
      - '"string" is truthy'
      - '"" is not truthy'
      - True is truthy
      - False is not truthy
      - true is truthy
      - false is not truthy
      - 1 is truthy
      - 0 is not truthy
      - '[""] is truthy'
      - '[] is not truthy'
      - '"on" is truthy(convert_bool=True)'
      - '"off" is not truthy(convert_bool=True)'
      - '{} is not truthy'
      - '{"key": "value"} is truthy'      

- name: Assert falsy tests work
  assert:
    that:
      - '"string" is not falsy'
      - '"" is falsy'
      - True is not falsy
      - False is falsy
      - true is not falsy
      - false is falsy
      - 1 is not falsy
      - 0 is falsy
      - '[""] is not falsy'
      - '[] is falsy'
      - '"on" is not falsy(convert_bool=True)'
      - '"off" is falsy(convert_bool=True)'
      - '{} is falsy'
      - '{"key": "value"} is not falsy'