Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
52 changed files
with
1,584 additions
and
579 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
test/api/v4/user/auth/POST-user_verify_display_name.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { | ||
generateUser, | ||
translate as t, | ||
} from '../../../../helpers/api-integration/v4'; | ||
|
||
const ENDPOINT = '/user/auth/verify-display-name'; | ||
|
||
describe('POST /user/auth/verify-display-name', async () => { | ||
let user; | ||
|
||
beforeEach(async () => { | ||
user = await generateUser(); | ||
}); | ||
|
||
it('successfully verifies display name including funky characters', async () => { | ||
let newDisplayName = 'Sabé 🤬'; | ||
let response = await user.post(ENDPOINT, { | ||
displayName: newDisplayName, | ||
}); | ||
expect(response).to.eql({ isUsable: true }); | ||
}); | ||
|
||
context('errors', async () => { | ||
it('errors if display name is not provided', async () => { | ||
await expect(user.post(ENDPOINT, { | ||
})).to.eventually.be.rejected.and.eql({ | ||
code: 400, | ||
error: 'BadRequest', | ||
message: t('invalidReqParams'), | ||
}); | ||
}); | ||
|
||
it('errors if display name is a slur', async () => { | ||
await expect(user.post(ENDPOINT, { | ||
displayName: 'TESTPLACEHOLDERSLURWORDHERE', | ||
})).to.eventually.eql({ isUsable: false, issues: [t('displaynameIssueSlur')] }); | ||
}); | ||
|
||
it('errors if display name contains a slur', async () => { | ||
await expect(user.post(ENDPOINT, { | ||
displayName: 'TESTPLACEHOLDERSLURWORDHERE_otherword', | ||
})).to.eventually.eql({ isUsable: false, issues: [t('displaynameIssueLength'), t('displaynameIssueSlur')] }); | ||
await expect(user.post(ENDPOINT, { | ||
displayName: 'something_TESTPLACEHOLDERSLURWORDHERE', | ||
})).to.eventually.eql({ isUsable: false, issues: [t('displaynameIssueLength'), t('displaynameIssueSlur')] }); | ||
await expect(user.post(ENDPOINT, { | ||
displayName: 'somethingTESTPLACEHOLDERSLURWORDHEREotherword', | ||
})).to.eventually.eql({ isUsable: false, issues: [t('displaynameIssueLength'), t('displaynameIssueSlur')] }); | ||
}); | ||
|
||
it('errors if display name has incorrect length', async () => { | ||
await expect(user.post(ENDPOINT, { | ||
displayName: 'this is a very long display name over 30 characters', | ||
})).to.eventually.eql({ isUsable: false, issues: [t('displaynameIssueLength')] }); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+2.33 KB
(100%)
website/client/assets/images/sprites/spritesmith-largeSprites-0.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.