Reacting to MVC's action result naming changes
This commit is contained in:
parent
2c5061a8ab
commit
3574b1d981
|
|
@ -66,7 +66,7 @@ namespace MusicStore.Areas.Admin.Controllers
|
|||
if (album == null)
|
||||
{
|
||||
cache.Remove(cacheKey);
|
||||
return HttpNotFound();
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(album);
|
||||
|
|
@ -119,7 +119,7 @@ namespace MusicStore.Areas.Admin.Controllers
|
|||
|
||||
if (album == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
ViewBag.GenreId = new SelectList(DbContext.Genres, "GenreId", "Name", album.GenreId);
|
||||
|
|
@ -157,7 +157,7 @@ namespace MusicStore.Areas.Admin.Controllers
|
|||
var album = await DbContext.Albums.Where(a => a.AlbumId == id).FirstOrDefaultAsync();
|
||||
if (album == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(album);
|
||||
|
|
@ -174,7 +174,7 @@ namespace MusicStore.Areas.Admin.Controllers
|
|||
var album = await DbContext.Albums.Where(a => a.AlbumId == id).FirstOrDefaultAsync();
|
||||
if (album == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
DbContext.Albums.Remove(album);
|
||||
|
|
@ -203,7 +203,7 @@ namespace MusicStore.Areas.Admin.Controllers
|
|||
|
||||
if (album == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return Content(album.AlbumId.ToString());
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace MusicStore.Controllers
|
|||
|
||||
if (genreModel == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(genreModel);
|
||||
|
|
@ -70,7 +70,7 @@ namespace MusicStore.Controllers
|
|||
|
||||
if (album == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(album);
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ namespace MusicStore.Controllers
|
|||
var result = await controller.Browse(string.Empty);
|
||||
|
||||
// Assert
|
||||
Assert.IsType<HttpNotFoundResult>(result);
|
||||
Assert.IsType<NotFoundResult>(result);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
@ -96,7 +96,7 @@ namespace MusicStore.Controllers
|
|||
var result = await controller.Details(_serviceProvider.GetRequiredService<IMemoryCache>(), albumId);
|
||||
|
||||
// Assert
|
||||
Assert.IsType<HttpNotFoundResult>(result);
|
||||
Assert.IsType<NotFoundResult>(result);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
|
|||
Loading…
Reference in New Issue