Update ListUsersTests to validate UserListFilter sorting and defaults
Enhanced the ListUsersTests by adding a comprehensive check for the UserListFilter, ensuring that sorting defaults are correctly applied when not specified in the request. This change improves the accuracy of the tests related to user listing functionality.
This commit is contained in:
@@ -50,10 +50,12 @@ public class ListUsersTests
|
||||
CancellationToken.None
|
||||
);
|
||||
|
||||
// Сверяем фильтр целиком, а не по полям: он record, и значение сравнивается по значению —
|
||||
// так проверяются и умолчания сортировки, которые запрос не задавал.
|
||||
await identity
|
||||
.Received(1)
|
||||
.ListUsersAsync(
|
||||
Arg.Is<UserListFilter>(f => f.Sort == null && !f.Desc && f.Search == null),
|
||||
new UserListFilter(1, 20, null, null, null),
|
||||
Arg.Any<CancellationToken>()
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user