1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 23:52:50 -05:00

Auth/pm 2996/add auth request data to devices response model (#5152)

fix(auth): [PM-2996] Add Pending Auth Request Data to Devices Response
- New stored procedure to fetch the appropriate data.
- Updated devices controller to respond with the new data.
- Tests written at the controller and repository level.
Resolves PM-2996
This commit is contained in:
Patrick-Pimentel-Bitwarden
2025-01-07 15:52:53 -05:00
committed by GitHub
parent 5ae232e336
commit cc96e35072
21 changed files with 620 additions and 30 deletions

View File

@ -11,9 +11,13 @@ namespace Bit.Infrastructure.EFIntegration.Test.Repositories;
public class DeviceRepositoryTests
{
[CiSkippedTheory, EfDeviceAutoData]
public async Task CreateAsync_Works_DataMatches(Device device, User user,
DeviceCompare equalityComparer, List<EfRepo.DeviceRepository> suts,
List<EfRepo.UserRepository> efUserRepos, SqlRepo.DeviceRepository sqlDeviceRepo,
public async Task CreateAsync_Works_DataMatches(
Device device,
User user,
DeviceCompare equalityComparer,
List<EfRepo.DeviceRepository> suts,
List<EfRepo.UserRepository> efUserRepos,
SqlRepo.DeviceRepository sqlDeviceRepo,
SqlRepo.UserRepository sqlUserRepo)
{
var savedDevices = new List<Device>();
@ -40,7 +44,6 @@ public class DeviceRepositoryTests
savedDevices.Add(savedSqlDevice);
var distinctItems = savedDevices.Distinct(equalityComparer);
Assert.True(!distinctItems.Skip(1).Any());
Assert.False(distinctItems.Skip(1).Any());
}
}