forked from cadence/out-of-your-element
Handle user creation for Clyde AI
This commit is contained in:
parent
fa68b877f6
commit
b9ec28a5ad
3 changed files with 32 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
|||
const {test} = require("supertape")
|
||||
const tryToCatch = require("try-to-catch")
|
||||
const assert = require("assert")
|
||||
const data = require("../../test/data")
|
||||
const {userToSimName} = require("./user-to-mxid")
|
||||
|
||||
test("user2name: cannot create user for a webhook", async t => {
|
||||
|
@ -39,3 +40,7 @@ test("user2name: uses ID if name becomes too short", t => {
|
|||
test("user2name: uses ID when name has only disallowed characters", t => {
|
||||
t.equal(userToSimName({username: "!@#$%^&*", discriminator: "0001", id: "9"}), "9")
|
||||
})
|
||||
|
||||
test("user2name: works on special user", t => {
|
||||
t.equal(userToSimName(data.user.clyde_ai), "clyde_ai")
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue