File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class OneSignalMockChannelController {
2424 state = OneSignalState ();
2525 }
2626
27- Future <Null > _handleMethod (MethodCall call) async {
27+ Future <dynamic > _handleMethod (MethodCall call) async {
2828 print ("Mock method called: ${call .method }" );
2929 switch (call.method) {
3030 case "OneSignal#init" :
@@ -59,10 +59,10 @@ class OneSignalMockChannelController {
5959 break ;
6060 case "OneSignal#sendTags" :
6161 this .state.tags = call.arguments;
62- break ;
62+ return { "success" : true } ;
6363 case "OneSignal#deleteTags" :
6464 this .state.deleteTags = call.arguments;
65- break ;
65+ return { "success" : true } ;
6666 }
6767 }
6868}
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ void main() {
5555 });
5656
5757 test ('post notification' , () {
58- onesignal.postNotification ({"content_available" : true , "include_player_ids" : [testPlayerId]}).then (expectAsync1 ((v) {
58+ onesignal.postNotificationWithJson ({"content_available" : true , "include_player_ids" : [testPlayerId]}).then (expectAsync1 ((v) {
5959 expect (channelController.state.postNotificationJson['content_available' ], true );
6060 expect (channelController.state.postNotificationJson['include_player_ids' ], [testPlayerId]);
6161 }));
You can’t perform that action at this time.
0 commit comments