mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
fix(test): copypasta and string trouble
This commit is contained in:
@@ -32,26 +32,26 @@ describe('POST /user/auth/verify-display-name', async () => {
|
|||||||
|
|
||||||
it('errors if display name is a slur', async () => {
|
it('errors if display name is a slur', async () => {
|
||||||
await expect(user.post(ENDPOINT, {
|
await expect(user.post(ENDPOINT, {
|
||||||
username: 'TESTPLACEHOLDERSLURWORDHERE',
|
displayName: 'TESTPLACEHOLDERSLURWORDHERE',
|
||||||
})).to.eventually.eql({ isUsable: false, issues: [t('displaynameIssueSlur')] });
|
})).to.eventually.eql({ isUsable: false, issues: [t('displaynameIssueSlur')] });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('errors if display name contains a slur', async () => {
|
it('errors if display name contains a slur', async () => {
|
||||||
await expect(user.post(ENDPOINT, {
|
await expect(user.post(ENDPOINT, {
|
||||||
username: 'TESTPLACEHOLDERSLURWORDHERE_otherword',
|
displayName: 'TESTPLACEHOLDERSLURWORDHERE_otherword',
|
||||||
})).to.eventually.eql({ isUsable: false, issues: [t('displaynameIssueLength'), t('displaynameIssueSlur')] });
|
})).to.eventually.eql({ isUsable: false, issues: [t('displaynameIssueLength'), t('displaynameIssueSlur')] });
|
||||||
await expect(user.post(ENDPOINT, {
|
await expect(user.post(ENDPOINT, {
|
||||||
username: 'something_TESTPLACEHOLDERSLURWORDHERE',
|
displayName: 'something_TESTPLACEHOLDERSLURWORDHERE',
|
||||||
})).to.eventually.eql({ isUsable: false, issues: [t('displaynameIssueLength'), t('displaynameIssueSlur')] });
|
})).to.eventually.eql({ isUsable: false, issues: [t('displaynameIssueLength'), t('displaynameIssueSlur')] });
|
||||||
await expect(user.post(ENDPOINT, {
|
await expect(user.post(ENDPOINT, {
|
||||||
username: 'somethingTESTPLACEHOLDERSLURWORDHEREotherword',
|
displayName: 'somethingTESTPLACEHOLDERSLURWORDHEREotherword',
|
||||||
})).to.eventually.eql({ isUsable: false, issues: [t('displaynameIssueLength'), t('displaynameIssueSlur')] });
|
})).to.eventually.eql({ isUsable: false, issues: [t('displaynameIssueLength'), t('displaynameIssueSlur')] });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('errors if display name has incorrect length', async () => {
|
it('errors if display name has incorrect length', async () => {
|
||||||
await expect(user.post(ENDPOINT, {
|
await expect(user.post(ENDPOINT, {
|
||||||
username: 'this is a very long display name over 30 characters',
|
displayName: 'this is a very long display name over 30 characters',
|
||||||
})).to.eventually.eql({ isUsable: false, issues: [t('displayNameIssueLength')] });
|
})).to.eventually.eql({ isUsable: false, issues: [t('displaynameIssueLength')] });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user