summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/filter_urls/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/filter_urls/tasks/main.yml')
-rw-r--r--test/integration/targets/filter_urls/tasks/main.yml24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/integration/targets/filter_urls/tasks/main.yml b/test/integration/targets/filter_urls/tasks/main.yml
new file mode 100644
index 0000000..c062326
--- /dev/null
+++ b/test/integration/targets/filter_urls/tasks/main.yml
@@ -0,0 +1,24 @@
+- name: Test urldecode filter
+ set_fact:
+ urldecoded_string: key="@{}é&%£ foo bar '(;\<>""°)
+
+- name: Test urlencode filter
+ set_fact:
+ urlencoded_string: 'key%3D%22%40%7B%7D%C3%A9%26%25%C2%A3%20foo%20bar%20%27%28%3B%5C%3C%3E%22%22%C2%B0%29'
+
+- name: Verify urlencode / urldecode isomorphism
+ assert:
+ that:
+ - urldecoded_string == urlencoded_string|urldecode
+ - urlencoded_string == urldecoded_string|urlencode
+
+- name: Verify urlencode handles dicts properly
+ assert:
+ that:
+ - "{'foo': 'bar'}|urlencode == 'foo=bar'"
+ - "{'foo': 'bar', 'baz': 'buz'}|urlencode == 'foo=bar&baz=buz'"
+ - "()|urlencode == ''"
+
+# Needed (temporarily) due to coverage reports not including the last task.
+- assert:
+ that: true