1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

[EC-1032] if name is Empty, set to null before saving (#2619)

This commit is contained in:
Jake Fink
2023-01-25 11:07:33 -05:00
committed by GitHub
parent cb1ba50ce2
commit 64c15ed8cd
2 changed files with 14 additions and 0 deletions

View File

@ -19,6 +19,14 @@ namespace Bit.Core.Test.Services;
[SutProviderCustomize]
public class UserServiceTests
{
[Theory, BitAutoData]
public async Task SaveUserAsync_SetsNameToNull_WhenNameIsEmpty(SutProvider<UserService> sutProvider, User user)
{
user.Name = string.Empty;
await sutProvider.Sut.SaveUserAsync(user);
Assert.Null(user.Name);
}
[Theory, BitAutoData]
public async Task UpdateLicenseAsync_Success(SutProvider<UserService> sutProvider,
User user, UserLicense userLicense)