Пример #1
0
        public async void TagsController_Edit()
        {
            var ctrlr = new TagsController(_dbContext);
            Tag tag   = _dbContext.Tag.SingleOrDefault(d => d.TagId == 1);

            tag.TagName = "more stuff";
            var result = await ctrlr.Edit(tag.TagId, tag);

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

            Assert.Equal(1, _dbContext.Tag.Count(d => d.TagName == "more stuff"));
        }