aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2022-07-26 16:12:40 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2022-07-26 16:12:40 +0200
commit2734771b4bb7f8c9f65561010b965c28aaf09cfa (patch)
tree31a1adf8d76673d8de79c64f57ad62df39607455
parentb1f374363390777efa7e4b6d8a79940f1a716d1a (diff)
downloadgeldschieberbot-2734771b4bb7f8c9f65561010b965c28aaf09cfa.tar.gz
geldschieberbot-2734771b4bb7f8c9f65561010b965c28aaf09cfa.zip
test: add test for transactions with unknown recipient
-rwxr-xr-xtest.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test.py b/test.py
index 4df0128..81375fc 100755
--- a/test.py
+++ b/test.py
@@ -153,6 +153,13 @@ class TestTransactionCmd(unittest.TestCase):
def setUp(self):
reset_state("test/state_3users.json")
+ def test_unknown_recipient(self):
+ res = run_bot(self, num[alice], "!schieb 10 horst")
+ self.assertEqual(res.stdout, 'ERROR: recipient not known')
+
+ res = run_bot(self, num[alice], "!schieb horst 10")
+ self.assertEqual(res.stdout, 'ERROR: recipient not known')
+
def test_correct_schieb(self):
res = run_bot(self, num[alice], "!schieb 10 " + bob)
self.assertEqual(res.stdout, f'New Balance: {alice} <- 10.00 {bob}\n')