Skip to content

Commit

Permalink
feat: update allowed channels for VerifyV2 template fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
Tr00d committed Sep 25, 2024
1 parent 254e7a7 commit 0bc9705
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public void Create_ShouldReturnFailure_GivenTemplateIdIsEmpty() =>
[InlineData(VerificationChannel.SilentAuth)]
[InlineData(VerificationChannel.WhatsApp)]
[InlineData(VerificationChannel.WhatsAppInteractive)]
[InlineData(VerificationChannel.Email)]
public void Create_ShouldReturnFailure_GivenChannelIsNotSupported(VerificationChannel channel) =>
CreateTemplateFragmentRequest.Build()
.WithTemplateId(ValidTemplateId)
Expand Down Expand Up @@ -93,7 +94,6 @@ public void Create_ShouldSetLocale() =>
[Theory]
[InlineData(VerificationChannel.Sms)]
[InlineData(VerificationChannel.Voice)]
[InlineData(VerificationChannel.Email)]
public void Create_ShouldSetChannel(VerificationChannel channel) =>
CreateTemplateFragmentRequest.Build()
.WithTemplateId(ValidTemplateId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private static Result<CreateTemplateFragmentRequest> VerifyChannel(
$"{nameof(request.Channel)} must be one of {VerificationChannel.Sms}, {VerificationChannel.Voice} or {VerificationChannel.Email}."));

private static bool IsChannelSupported(VerificationChannel channel) =>
new[] {VerificationChannel.Sms, VerificationChannel.Voice, VerificationChannel.Email}.Contains(channel);
new[] {VerificationChannel.Sms, VerificationChannel.Voice}.Contains(channel);
}

/// <summary>
Expand Down

0 comments on commit 0bc9705

Please sign in to comment.