mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
test: add failing tests for actor/group assertion via wrong method, remote user to category migration
This commit is contained in:
@@ -60,9 +60,18 @@ describe('Actor asserton', () => {
|
|||||||
const url = await user.getUserField(actorUri, 'url');
|
const url = await user.getUserField(actorUri, 'url');
|
||||||
assert.strictEqual(url, actorUri);
|
assert.strictEqual(url, actorUri);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should assert group actors by calling actors.assertGroup', async () => {
|
||||||
|
assert(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('edge case: loopback handles and uris', () => {
|
it('should migrate a user to a category if on re-assertion it identifies as an as:Group', async () => {
|
||||||
|
// This is to handle previous behaviour that saved all as:Group actors as NodeBB users.
|
||||||
|
assert(false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('edge cases: loopback handles and uris', () => {
|
||||||
let uid;
|
let uid;
|
||||||
const userslug = utils.generateUUID().slice(0, 8);
|
const userslug = utils.generateUUID().slice(0, 8);
|
||||||
before(async () => {
|
before(async () => {
|
||||||
@@ -90,6 +99,10 @@ describe('Actor asserton', () => {
|
|||||||
assert.strictEqual(userRemoteHashExists, false);
|
assert.strictEqual(userRemoteHashExists, false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('deletion', () => {
|
||||||
|
// todo...
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe.only('Group assertion', () => {
|
describe.only('Group assertion', () => {
|
||||||
@@ -122,6 +135,10 @@ describe.only('Group assertion', () => {
|
|||||||
assert(category);
|
assert(category);
|
||||||
assert.strictEqual(category.cid, actorUri);
|
assert.strictEqual(category.cid, actorUri);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should assert non-group users by calling actors.assert', async () => {
|
||||||
|
assert(false);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Controllers', () => {
|
describe('Controllers', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user