We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a86e36 commit 43dbb6cCopy full SHA for 43dbb6c
runtime/tests/pallet_proxy.rs
@@ -200,3 +200,30 @@ fn test_proxy_pallet() {
200
}
201
202
203
+
204
+#[test]
205
+fn test_non_transfer_cannot_transfer() {
206
+ new_test_ext().execute_with(|| {
207
+ assert_ok!(Proxy::add_proxy(
208
+ RuntimeOrigin::signed(AccountId::from(ACCOUNT)),
209
+ AccountId::from(DELEGATE).into(),
210
+ ProxyType::NonTransfer,
211
+ 0
212
+ ));
213
214
+ let call = call_transfer();
215
+ assert_ok!(Proxy::proxy(
216
+ RuntimeOrigin::signed(AccountId::from(DELEGATE)),
217
+ AccountId::from(ACCOUNT).into(),
218
+ None,
219
+ Box::new(call.clone()),
220
221
222
+ System::assert_last_event(
223
+ pallet_proxy::Event::ProxyExecuted {
224
+ result: Err(SystemError::CallFiltered.into()),
225
+ }
226
+ .into(),
227
+ );
228
+ });
229
+}
0 commit comments