fix(sms): S2 review — add DeleteSmsConfigurationAsync + schema/repo tests + doc nit

This commit is contained in:
Joseph Doherty
2026-06-19 10:06:44 -04:00
parent b46691747c
commit 3827b98484
6 changed files with 47 additions and 2 deletions
@@ -226,6 +226,34 @@ public class NotificationRepositoryTests : IDisposable
Assert.Null(await _repository.GetNotificationListByIdAsync(list.Id));
}
[Fact]
public async Task AddSmsConfiguration_RoundTrips()
{
var sms = new SmsConfiguration("ACtest123", "+14155550100");
await _repository.AddSmsConfigurationAsync(sms);
await _repository.SaveChangesAsync();
var loaded = await _repository.GetSmsConfigurationAsync();
Assert.NotNull(loaded);
Assert.Equal("ACtest123", loaded!.AccountSid);
Assert.Equal("+14155550100", loaded.FromNumber);
// Update a field and verify GetAllSmsConfigurationsAsync reflects it.
loaded.FromNumber = "+14155550199";
await _repository.UpdateSmsConfigurationAsync(loaded);
await _repository.SaveChangesAsync();
var all = await _repository.GetAllSmsConfigurationsAsync();
Assert.Single(all);
Assert.Equal("+14155550199", all[0].FromNumber);
// Delete and verify removal.
await _repository.DeleteSmsConfigurationAsync(loaded.Id);
await _repository.SaveChangesAsync();
Assert.Null(await _repository.GetSmsConfigurationAsync());
}
[Fact]
public async Task NotificationList_PersistsType()
{