@@ -168,7 +168,7 @@ namespace MyApp.Tests.Controllers
168
168
.Controller <HomeController >()
169
169
.Calling (c => c .Index ())
170
170
.ShouldReturn ()
171
- .View ();
171
+ .Ok ();
172
172
}
173
173
}
174
174
```
@@ -286,7 +286,7 @@ MyController<MyMvcController>
286
286
.Passing (cacheModel => cacheModel .Id == 1 )))
287
287
.AndAlso ()
288
288
.ShouldReturn ()
289
- .View (result => result
289
+ .Ok (result => result
290
290
.WithModelOfType <MyResponseModel >());
291
291
292
292
// Instantiates controller with the registered global services,
@@ -316,7 +316,7 @@ MyController<MyMvcController>
316
316
.ContainingEntryWithKey (ControllerConstants .SuccessMessage ))
317
317
.AndAlso ()
318
318
.ShouldReturn ()
319
- .Redirect (redirect => redirect
319
+ .Redirect (result => result
320
320
.To <AnotherController >(c => c .AnotherAction ()));
321
321
```
322
322
@@ -337,7 +337,7 @@ MyController<MyMvcController>
337
337
From .Services <IYetAnotherService >()) // Provides a global service.
338
338
.Calling (c => c .MyAction ())
339
339
.ShouldReturn ()
340
- .View ();
340
+ .Accepted ();
341
341
342
342
// Instantiates controller with the provided service mocks,
343
343
// and tests for view result.
@@ -494,7 +494,7 @@ MyMvc
494
494
495
495
// Assert
496
496
.ShouldReturn ()
497
- .Redirect (redirect => redirect
497
+ .Redirect (result => result
498
498
.To <AnotherController >(c => c .AnotherAction (
499
499
With .No <MyDataContext >(),
500
500
id )));
@@ -513,7 +513,7 @@ var call = controller.Calling(c => c.MyAction(id));
513
513
// Assert
514
514
call
515
515
.ShouldReturn ()
516
- .View ( view => view
516
+ .Json ( result => result
517
517
.WithModelOfType <MyModel >()
518
518
.Passing (model => model .Id == id ));
519
519
```
@@ -570,9 +570,9 @@ MyMvc
570
570
.WithDomain (" mydomain.com" )
571
571
.WithExpiration (myDateTimeOffset )
572
572
.WithPath (" /" )))
573
- .AndAlso ()
573
+ .AndAlso ()
574
574
.ShouldReturn ()
575
- .Ok ();
575
+ .BadRequest ();
576
576
```
577
577
578
578
## Versioning
0 commit comments