Skip to content

Commit

Permalink
fix: send a valid but wrong candid
Browse files Browse the repository at this point in the history
  • Loading branch information
ilbertt committed Nov 15, 2023
1 parent a2d952e commit 4e573e3
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use std::ops::Deref;

use candid::encode_one;

use crate::{
tests::common::generate_random_principal, CanisterAckMessageContent,
CanisterWsMessageArguments, CanisterWsMessageResult, ClientKeepAliveMessageContent, ClientKey,
Expand Down Expand Up @@ -141,7 +143,12 @@ fn test_5_fails_if_client_sends_a_wrong_service_message() {
let res = call_ws_message(
&client_1_key.client_principal,
CanisterWsMessageArguments {
msg: create_websocket_message(client_1_key, 1, Some(vec![1, 2, 3]), true),
msg: create_websocket_message(
client_1_key,
1,
Some(encode_one(vec![1, 2, 3]).unwrap()),
true,
),
},
);
match res {
Expand Down

0 comments on commit 4e573e3

Please sign in to comment.