basic send_message test
This commit is contained in:
parent
6416370e95
commit
5ab40f2b50
@ -2,7 +2,9 @@
|
||||
|
||||
# Available tests marked with `TEST` - ez grep usage
|
||||
|
||||
active_tests='list_all_channels create_channel delete_channel'
|
||||
active_tests='list_all_channels create_channel delete_channel
|
||||
send_message
|
||||
'
|
||||
|
||||
list_all_channels() { # TEST
|
||||
result=$(curl --silent -i $GET $url/channels/list -d $simple_key)
|
||||
@ -25,11 +27,11 @@ delete_channel() {
|
||||
}
|
||||
|
||||
send_message() {
|
||||
# creating a bs channel, we don't care about this operation
|
||||
# as long as the other test passes this should be fine
|
||||
$crl $POST $url/channel/create -d '{"secret":"secret","name":"msgchannel"}'
|
||||
# ignoring the reaction to this as its not _completely_ relevant for this test
|
||||
$crl $POST $url/channels/create -d '{"secret":"secret","name":"msgchannel","kind":2}' > /dev/null
|
||||
|
||||
kv='{"secret":"secret", "content":"message sample", "channel":123}'
|
||||
# now we can try sending the right parameters to send a basic message
|
||||
kv='{"secret":"secret", "content":"message sample", "channel":"msgchannel"}'
|
||||
result=$($crl $POST $url/message/send -d "$kv")
|
||||
code=$(echo "$result" | grep HTTP\/1.1 | awk '{print $2}')
|
||||
# non-existant channel for now but whatever ignore for now
|
||||
|
Loading…
Reference in New Issue
Block a user