mirror of
https://github.com/bitwarden/server
synced 2026-02-20 11:23:37 +00:00
[PM-25106] Refactor Misleading Stored Procedure/Repository Language (#6890)
* Begin migration to appropriately named sprocs * Update method and parameter names * Remove incorrect change * Changes EF to match collection type comparison * Adds integration test verifying excluded collections * Changes EF to match collection type comparison * Fix whitespacing * Fix dedented if
This commit is contained in:
@@ -107,7 +107,7 @@ public class CollectionsControllerTests
|
||||
|
||||
await sutProvider.Sut.GetManyWithDetails(organization.Id);
|
||||
|
||||
await sutProvider.GetDependency<ICollectionRepository>().Received(1).GetManyByOrganizationIdWithPermissionsAsync(organization.Id, userId, true);
|
||||
await sutProvider.GetDependency<ICollectionRepository>().Received(1).GetManySharedByOrganizationIdWithPermissionsAsync(organization.Id, userId, true);
|
||||
}
|
||||
|
||||
[Theory, BitAutoData]
|
||||
@@ -143,12 +143,12 @@ public class CollectionsControllerTests
|
||||
.Returns(AuthorizationResult.Success());
|
||||
|
||||
sutProvider.GetDependency<ICollectionRepository>()
|
||||
.GetManyByOrganizationIdWithPermissionsAsync(organization.Id, userId, true)
|
||||
.GetManySharedByOrganizationIdWithPermissionsAsync(organization.Id, userId, true)
|
||||
.Returns(collections);
|
||||
|
||||
var response = await sutProvider.Sut.GetManyWithDetails(organization.Id);
|
||||
|
||||
await sutProvider.GetDependency<ICollectionRepository>().Received(1).GetManyByOrganizationIdWithPermissionsAsync(organization.Id, userId, true);
|
||||
await sutProvider.GetDependency<ICollectionRepository>().Received(1).GetManySharedByOrganizationIdWithPermissionsAsync(organization.Id, userId, true);
|
||||
Assert.Single(response.Data);
|
||||
Assert.All(response.Data, c => Assert.Equal(organization.Id, c.OrganizationId));
|
||||
Assert.All(response.Data, c => Assert.Equal(managedCollection.Id, c.Id));
|
||||
|
||||
Reference in New Issue
Block a user