File tree Expand file tree Collapse file tree
EssentialCSharp.Web.Tests
EssentialCSharp.Web/Views/Home Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,5 +51,10 @@ public async Task WhenTheApplicationStarts_NonExistingPage_GivesCorrectStatusCod
5151 using HttpResponseMessage response = await client . GetAsync ( "/non-existing-page1234" ) ;
5252
5353 await Assert . That ( response . StatusCode ) . IsEqualTo ( HttpStatusCode . NotFound ) ;
54+
55+ string content = await response . Content . ReadAsStringAsync ( ) ;
56+ await Assert . That ( content ) . Contains ( "Go Home" ) ;
57+ await Assert . That ( content ) . Contains ( "Go Back" ) ;
58+ await Assert . That ( content ) . Contains ( "Browse Chapters" ) ;
5459 }
55- }
60+ }
Original file line number Diff line number Diff line change 1616 }
1717 <div class =" d-flex gap-2" >
1818 <a href =" /home" class =" btn btn-primary" >Go Home</a >
19+ <a href =" /hello-world" class =" btn btn-outline-primary" >Browse Chapters</a >
1920 <button type =" button" class =" btn btn-secondary"
2021 onclick =" if(history.length > 1){ history.back(); } else { window.location='/home'; }" >
2122 Go Back
You can’t perform that action at this time.
0 commit comments