示例#1
0
        public async Task ConfirmCreateBlog_ViewName_CreateBlog_Ok()
        {
            _controller.SetupUser(1);
            _postManager.Setup(repo => repo.CreatePost(new PostDto()));
            var result = await _controller.ConfirmCreatePost(new CreatePostViewModel());

            var viewResult = Assert.IsType <RedirectToActionResult>(result);

            Assert.True(viewResult.ActionName == "Index");
        }