mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-19 09:53:08 +02:00
Tests: expose 'args' passed to hook scripts
- Useful to validate that all the expected arguments were passed with correct escaping. - Update test/template.t with one use-case for 'args'
This commit is contained in:
parent
09d86eb165
commit
fd17a68930
4 changed files with 12 additions and 8 deletions
|
@ -157,6 +157,9 @@ sys.exit(0)
|
|||
# (according to python's JSON parser)
|
||||
hook.assertValidJSONOutput()
|
||||
|
||||
# Checking which arguments were passed to the hook
|
||||
self.assertIn("/Hello/Greetings/", logs["calls"][0]["args"])
|
||||
|
||||
# Some message output from the hook
|
||||
self.assertEqual(logs["output"]["msgs"][0],
|
||||
"Hello from the template hook")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue