Example #1
0
        public async Task CustomerAppointmentHistory_ReturnsAViewResult_WithUserName()
        {
            var controller = new CustomerController();
            var user       = "******";

            var result = await controller.AppointmentHistory(user);

            var viewResult = Assert.IsType <ViewResult>(result);
            var model      = Assert.IsAssignableFrom <AppointmentViewModel>(viewResult.ViewData.Model);

            Assert.Equal(user, model.CustomerUsername);
        }