Skip to content

Commit ab2761a

Browse files
fix test
1 parent ea61f88 commit ab2761a

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

tests/events/src/lib.rs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ impl Contract {
2222
symbol_short!("hello"),
2323
);
2424
env.events().publish_event(&TransferEvent {
25-
name: symbol_short!("ho_ho_ho"),
26-
value: symbol_short!("santa"),
25+
name: symbol_short!("name"),
26+
value: symbol_short!("value"),
2727
});
2828
}
2929
}
@@ -55,19 +55,12 @@ mod test {
5555
// Expect this event body.
5656
symbol_short!("hello").into_val(&env)
5757
),
58-
(
59-
contract_id.clone(),
60-
// Expect these event topics.
61-
(symbol_short!("farewells"), symbol_short!("topic2")).into_val(&env),
62-
// Expect this event body.
63-
symbol_short!("bye").into_val(&env)
64-
),
6558
(
6659
contract_id,
6760
// Expect these event topics.
68-
(symbol_short!("hi_hi"), symbol_short!("topic2")).into_val(&env),
61+
(symbol_short!("transfer"), symbol_short!("name")).into_val(&env),
6962
// Expect this event body.
70-
symbol_short!("boo").into_val(&env)
63+
symbol_short!("value").into_val(&env)
7164
),
7265
],
7366
);

tests/events/test_snapshots/test/test_pub_event.1.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
}
9696
}
9797
},
98-
"failed_call": true
98+
"failed_call": false
9999
},
100100
{
101101
"event": {
@@ -106,19 +106,19 @@
106106
"v0": {
107107
"topics": [
108108
{
109-
"symbol": "hi_hi"
109+
"symbol": "transfer"
110110
},
111111
{
112-
"symbol": "topic2"
112+
"symbol": "name"
113113
}
114114
],
115115
"data": {
116-
"symbol": "boo"
116+
"symbol": "value"
117117
}
118118
}
119119
}
120120
},
121-
"failed_call": true
121+
"failed_call": false
122122
}
123123
]
124124
}

0 commit comments

Comments
 (0)