public async Task SaveBlogPost_Ok() { //Arrange var blogPost = TestHelper.GetBlogPostViewModel(); //Act var response = await _blogController.SavePost(blogPost); //Need to Dispose to save new Blog and use on further tests _blogController.Dispose(); //Assert Assert.True(response is LocalRedirectResult); Assert.True(_blogController.TempData["msg"] != null); Assert.True(_blogController.TempData["error"] == null); }