Unit Tests

- Added feedback to the on-modify-misbehave2 test hook script.
This commit is contained in:
Paul Beckingham 2015-02-14 17:42:03 -05:00
parent a2e980c6b8
commit 83519a44c6
2 changed files with 2 additions and 1 deletions

View file

@ -75,7 +75,7 @@ class TestHooksOnModify(TestCase):
code, out, err = self.t(("add", "foo"))
code, out, err = self.t.runError(("1", "modify", "+tag"))
self.assertIn("ERROR MISSING JSON", err)
self.assertIn("Hook Error: Expected 1 JSON task(s), found 0", err)
self.t.hooks[hookname].assertTriggered()
self.t.hooks[hookname].assertTriggeredCount(1)
self.t.hooks[hookname].assertExitcode(0)

View file

@ -12,6 +12,7 @@ read modified_task
# Output:
# - JSON, modified or unmodified.
# - Optional feedback/error.
echo 'FEEDBACK'
# Status:
# - 0: JSON accepted, non-JSON is feedback.