public async Task FailsForNonExistingUser() { var(validApi, _) = await SetupTestUser(); ValidApi = validApi; var email = RandomEmail.GenerateInvalid(); var wrongCredentials = Credentials .WithPassword(email, "123456789".ToPassword()); CallingEndpointWith(TogglApiWith(wrongCredentials)).Should().Throw <UnauthorizedException>(); }
public async Task DoesAcceptFeedbackFromADifferentUserFromTheLoggedIn() { var(togglApi, user) = await SetupTestUser(); var email = RandomEmail.GenerateInvalid(); var message = defaultMessage + "\n\nThis message was sent with an email address that is not associated with the user's account."; Func <Task> sendingFeedback = async() => await togglApi.Feedback.Send( email : email, message : message, data : defaultMetaData ); sendingFeedback.Should().NotThrow(); }