@@ -201,17 +201,17 @@ - (void)testRunningInitialRouteSendsNavigationMessage {
201201 // Run with an initial route.
202202 [engine runWithEntrypoint: FlutterDefaultDartEntrypoint initialRoute: @" test" ];
203203
204- // Initial route is set directly in the shell/engine and should not send a platform
205- // channel message as it will arrive too late .
204+ // Now check that an encoded method call has been made on the binary messenger to set the
205+ // initial route to "test" .
206206 FlutterMethodCall* setInitialRouteMethodCall =
207207 [FlutterMethodCall methodCallWithMethodName: @" setInitialRoute" arguments: @" test" ];
208208 NSData * encodedSetInitialRouteMethod =
209209 [[FlutterJSONMethodCodec sharedInstance ] encodeMethodCall: setInitialRouteMethodCall];
210- OCMReject ([mockBinaryMessenger sendOnChannel: @" flutter/navigation"
210+ OCMVerify ([mockBinaryMessenger sendOnChannel: @" flutter/navigation"
211211 message: encodedSetInitialRouteMethod]);
212212}
213213
214- - (void )testInitialRouteSettingsDoesNotSendNavigationMessage {
214+ - (void )testInitialRouteSettingsSendsNavigationMessage {
215215 id mockBinaryMessenger = OCMClassMock ([FlutterBinaryMessengerRelay class ]);
216216
217217 auto settings = FLTDefaultSettingsForBundle ();
@@ -221,13 +221,13 @@ - (void)testInitialRouteSettingsDoesNotSendNavigationMessage {
221221 [engine setBinaryMessenger: mockBinaryMessenger];
222222 [engine run ];
223223
224- // Initial route is set directly in the shell/engine and should not send a platform
225- // channel message as it will arrive too late .
224+ // Now check that an encoded method call has been made on the binary messenger to set the
225+ // initial route to "test" .
226226 FlutterMethodCall* setInitialRouteMethodCall =
227227 [FlutterMethodCall methodCallWithMethodName: @" setInitialRoute" arguments: @" test" ];
228228 NSData * encodedSetInitialRouteMethod =
229229 [[FlutterJSONMethodCodec sharedInstance ] encodeMethodCall: setInitialRouteMethodCall];
230- OCMReject ([mockBinaryMessenger sendOnChannel: @" flutter/navigation"
230+ OCMVerify ([mockBinaryMessenger sendOnChannel: @" flutter/navigation"
231231 message: encodedSetInitialRouteMethod]);
232232}
233233
0 commit comments