public void Index_Action_Returns_View() { var controller = new DonationController(donationsService); var result = controller.Index(); result.AssertViewRendered(); }
public void TopDonations_Action_Returns_View_With_A_List_Donations() { donationsService.GetTopDonations().Received().Returns(new List<Donation>()); var controller = new DonationController(donationsService); var result = controller.TopDonations(); result.AssertViewRendered().WithViewData<IEnumerable<Donation>>(); }
public void QuickDonate_Action_Returns_View_With_An_Integer() { var id = 1; var controller = new DonationController(donationsService); var result = controller.QuickDonate(id); result.AssertViewRendered().WithViewData<int>(); }
public void QuickDonate_Action_Returns_View_With_A_QuickDonateViewModel() { const int id = 1; var controller = new DonationController(donationsService, campaignService); var result = controller.QuickDonate(id); result.AssertViewRendered().WithViewData<QuickDonateViewModel>(); }
public void DoQuickDonate_Action_Returns_View() { var id = 1; var amount = 100; var date = "10/11/2011"; int campaignId = 14; var controller = new DonationController(donationsService); var result = controller.DoQuickDonate(id, amount, date, campaignId); result.AssertViewRendered(); }