diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2024-05-18 21:01:59 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2024-05-20 20:40:23 +0200 |
commit | 49db4661634b364ea49758666623a2efc3ac7107 (patch) | |
tree | 85d35fc65c5e58ca263554c1c443bcd5fdf43376 /test | |
parent | 5c2edda307f7d2786fa75e32d3b63966cdf57972 (diff) |
Chatroom messages
Diffstat (limited to 'test')
-rw-r--r-- | test/chatroom.test | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/chatroom.test b/test/chatroom.test index ac66f38..ffb7b4d 100644 --- a/test/chatroom.test +++ b/test/chatroom.test @@ -73,3 +73,29 @@ test ChatroomSetup: with p: expect /chatroom-watched-updated [a-z0-9#]+ fourth2.*/ expect /chatroom-watched-updated [a-z0-9#]+ fifth2.*/ + + +test ChatroomMessages: + spawn as p1 + + send "create-identity Device1 Owner1" to p1 + + for p in [ p1 ]: + with p: + send "chatroom-watch-local" + send "start-server" + + send "chatroom-create room" to p1 + expect /chatroom-create-done ([a-z0-9#]+) room.*/ from p1 capture room + + for p in [ p1 ]: + with p: + expect /chatroom-watched-added $room room/ + + send "chatroom-message-send $room message1" to p1 + expect /chatroom-message-new $room from Owner1 text message1/ from p1 + + send "chatroom-message-send $room message2" to p1 + local: + expect /chatroom-message-new $room from Owner1 text (.*)/ from p1 capture msg + guard (msg == "message2") |