users: getAll -> list
This commit is contained in:
@@ -18,7 +18,7 @@ describe('User', function () {
|
||||
const { domainSetup, cleanup, admin, user, auditSource, checkMails, clearMailQueue } = common;
|
||||
|
||||
async function cleanupUsers() {
|
||||
for (const u of await users.getAll()) {
|
||||
for (const u of await users.list()) {
|
||||
await users.del(u, auditSource);
|
||||
}
|
||||
}
|
||||
@@ -175,25 +175,25 @@ describe('User', function () {
|
||||
checkUser(result, user);
|
||||
});
|
||||
|
||||
it('can getAll', async function () {
|
||||
const results = await users.getAll();
|
||||
it('can list', async function () {
|
||||
const results = await users.list();
|
||||
expect(results.length).to.be(2);
|
||||
checkUser(results[0], admin);
|
||||
checkUser(results[1], user);
|
||||
});
|
||||
|
||||
it('can getAllPaged', async function () {
|
||||
let results = await users.getAllPaged(null, 1, 1);
|
||||
it('can listPaged', async function () {
|
||||
let results = await users.listPaged(null, 1, 1);
|
||||
expect(results.length).to.be(1);
|
||||
checkUser(results[0], admin);
|
||||
|
||||
results = await users.getAllPaged(null, 2, 1);
|
||||
results = await users.listPaged(null, 2, 1);
|
||||
expect(results.length).to.be(1);
|
||||
checkUser(results[0], user);
|
||||
});
|
||||
|
||||
it('can getAllPaged (search)', async function () {
|
||||
let results = await users.getAllPaged(admin.email.slice(0, 8), 1, 1);
|
||||
it('can listPaged (search)', async function () {
|
||||
let results = await users.listPaged(admin.email.slice(0, 8), 1, 1);
|
||||
expect(results.length).to.be(1);
|
||||
checkUser(results[0], admin);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user