@@ -154,6 +154,7 @@ type Proxy = Module<Test>;
154
154
use frame_system:: Call as SystemCall ;
155
155
use pallet_balances:: Call as BalancesCall ;
156
156
use pallet_balances:: Error as BalancesError ;
157
+ use pallet_balances:: Event as BalancesEvent ;
157
158
use pallet_utility:: Call as UtilityCall ;
158
159
use pallet_utility:: Event as UtilityEvent ;
159
160
use super :: Call as ProxyCall ;
@@ -242,6 +243,14 @@ fn filtering_works() {
242
243
UtilityEvent :: BatchInterrupted ( 0 , DispatchError :: BadOrigin ) . into( ) ,
243
244
RawEvent :: ProxyExecuted ( Ok ( ( ) ) ) . into( ) ,
244
245
] ) ;
246
+
247
+ let call = Box :: new ( Call :: Proxy ( ProxyCall :: remove_proxies ( ) ) ) ;
248
+ assert_ok ! ( Proxy :: proxy( Origin :: signed( 3 ) , 1 , None , call. clone( ) ) ) ;
249
+ expect_event ( RawEvent :: ProxyExecuted ( Err ( DispatchError :: BadOrigin ) ) ) ;
250
+ assert_ok ! ( Proxy :: proxy( Origin :: signed( 4 ) , 1 , None , call. clone( ) ) ) ;
251
+ expect_event ( RawEvent :: ProxyExecuted ( Err ( DispatchError :: BadOrigin ) ) ) ;
252
+ assert_ok ! ( Proxy :: proxy( Origin :: signed( 2 ) , 1 , None , call. clone( ) ) ) ;
253
+ expect_events ( vec ! [ BalancesEvent :: <Test >:: Unreserved ( 1 , 5 ) . into( ) , RawEvent :: ProxyExecuted ( Ok ( ( ) ) ) . into( ) ] ) ;
245
254
} ) ;
246
255
}
247
256
0 commit comments