summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/jinja2_native_types/test_bool.yml
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/jinja2_native_types/test_bool.yml')
-rw-r--r--test/integration/targets/jinja2_native_types/test_bool.yml53
1 files changed, 53 insertions, 0 deletions
diff --git a/test/integration/targets/jinja2_native_types/test_bool.yml b/test/integration/targets/jinja2_native_types/test_bool.yml
new file mode 100644
index 0000000..f3b5e8c
--- /dev/null
+++ b/test/integration/targets/jinja2_native_types/test_bool.yml
@@ -0,0 +1,53 @@
+- name: test bool True
+ set_fact:
+ bool_var_true: "{{ b_true }}"
+
+- assert:
+ that:
+ - 'bool_var_true is sameas true'
+ - 'bool_var_true|type_debug == "bool"'
+
+- name: test bool False
+ set_fact:
+ bool_var_false: "{{ b_false }}"
+
+- assert:
+ that:
+ - 'bool_var_false is sameas false'
+ - 'bool_var_false|type_debug == "bool"'
+
+- name: test bool expr True
+ set_fact:
+ bool_var_expr_true: "{{ 1 == 1 }}"
+
+- assert:
+ that:
+ - 'bool_var_expr_true is sameas true'
+ - 'bool_var_expr_true|type_debug == "bool"'
+
+- name: test bool expr False
+ set_fact:
+ bool_var_expr_false: "{{ 2 + 2 == 5 }}"
+
+- assert:
+ that:
+ - 'bool_var_expr_false is sameas false'
+ - 'bool_var_expr_false|type_debug == "bool"'
+
+- name: test bool expr with None, True
+ set_fact:
+ bool_var_none_expr_true: "{{ None == None }}"
+
+- assert:
+ that:
+ - 'bool_var_none_expr_true is sameas true'
+ - 'bool_var_none_expr_true|type_debug == "bool"'
+
+- name: test bool expr with None, False
+ set_fact:
+ bool_var_none_expr_false: "{{ '' == None }}"
+
+- assert:
+ that:
+ - 'bool_var_none_expr_false is sameas false'
+ - 'bool_var_none_expr_false|type_debug == "bool"'