public void WillSendInstructions() { var user = new User { EmailAddress = "*****@*****.**", Username = "******" }; var messageService = new TestableMessageService(); messageService.SendPasswordResetInstructions(user, "http://example.com/pwd-reset-token-url", true); var message = messageService.MockMailSender.Sent.Last(); Assert.Equal("*****@*****.**", message.To[0].Address); Assert.Equal(TestGalleryNoReplyAddress.Address, message.From.Address); Assert.Equal("[Joe Shmoe] Please reset your password.", message.Subject); Assert.Contains("Click the following link within the next", message.Body); Assert.Contains("http://example.com/pwd-reset-token-url", message.Body); }
public void WillSendInstructions() { var user = new User { EmailAddress = "*****@*****.**", Username = "******" }; var messageService = new TestableMessageService(); messageService.SendPasswordResetInstructions(user, "http://example.com/pwd-reset-token-url", true); var message = messageService.MockMailSender.Sent.Last(); Assert.Equal("*****@*****.**", message.To[0].Address); Assert.Equal(TestGalleryOwner.Address, message.From.Address); Assert.Equal("[Joe Shmoe] Please reset your password.", message.Subject); Assert.Contains("Click the following link within the next", message.Body); Assert.Contains("http://example.com/pwd-reset-token-url", message.Body); }