feat(sms): CLI list --type/--phones + notification sms group + channel-aware recipients (S6)
This commit is contained in:
@@ -67,7 +67,21 @@ public class UpdateCommandContractTests
|
||||
|
||||
[Fact]
|
||||
public void NotificationUpdate_CoreFieldsRequired()
|
||||
=> AssertRequired(UpdateCommand(NotificationCommands.Build(Url, Format, Username, Password), "update"), "--name", "--emails");
|
||||
{
|
||||
// Only --name is unconditionally required. The recipient flags are channel-
|
||||
// conditional (SMS Notifications S6): --emails is required for --type email and
|
||||
// --phones for --type sms, so neither can be flagged Required at the option level
|
||||
// — the create/update builders validate the channel/recipient pairing instead.
|
||||
var update = UpdateCommand(NotificationCommands.Build(Url, Format, Username, Password), "update");
|
||||
AssertRequired(update, "--name");
|
||||
|
||||
foreach (var name in new[] { "--emails", "--phones" })
|
||||
{
|
||||
var option = update.Options.SingleOrDefault(o => o.Name == name);
|
||||
Assert.True(option != null, $"notification update is missing option '{name}'.");
|
||||
Assert.False(option!.Required, $"notification update option '{name}' must be conditionally validated, not Required.");
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ApiMethodUpdate_CoreFieldsRequired()
|
||||
|
||||
Reference in New Issue
Block a user