public async Task ItPassesTheEmailsToTheNotifyApi(string email) { OneTimeLinkNotification notification = new OneTimeLinkNotification { Email = email, Url = "stub", Token = "stub" }; await _classUnderTest.SendOneTimeLinkAsync(notification, CancellationToken.None); NotifyRequest notifyRequest = _simulator.ReceivedRequests[0].BodyAs <NotifyRequest>(); notifyRequest.email_address.Should().Be(email); }
public async Task ItPassesTheAccessUrlToTheNotifyApi(string assetRegisterUrl, string token) { OneTimeLinkNotification notification = new OneTimeLinkNotification { Email = "*****@*****.**", Url = assetRegisterUrl, Token = token }; await _classUnderTest.SendOneTimeLinkAsync(notification, CancellationToken.None); NotifyRequest notifyRequest = _simulator.ReceivedRequests[0].BodyAs <NotifyRequest>(); var expectedUrl = $"{assetRegisterUrl}?token={token}"; notifyRequest.personalisation.access_url.Should().Be(expectedUrl); }