lint: Fix linting errors in api v2 tests
This commit is contained in:
@@ -12,13 +12,12 @@ describe('DELETE /user/tasks/:id', () => {
|
||||
});
|
||||
|
||||
it('deletes a task', async () => {
|
||||
return expect(user.del(`/user/tasks/${task.id}`)
|
||||
.then((res) => {
|
||||
return user.get(`/user/tasks/${task.id}`);
|
||||
})).to.eventually.be.rejected.and.eql({
|
||||
code: 404,
|
||||
text: t('messageTaskNotFound'),
|
||||
});
|
||||
await user.del(`/user/tasks/${task.id}`);
|
||||
|
||||
await expect(user.get(`/user/tasks/${task.id}`)).to.eventually.be.rejected.and.eql({
|
||||
code: 404,
|
||||
text: t('messageTaskNotFound'),
|
||||
});
|
||||
});
|
||||
|
||||
it('returns an error if the task does not exist', async () => {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import {
|
||||
generateUser,
|
||||
translate as t,
|
||||
} from '../../../../helpers/api-integration.helper';
|
||||
|
||||
describe('GET /user/tasks/', () => {
|
||||
|
||||
@@ -4,7 +4,6 @@ import {
|
||||
} from '../../../../helpers/api-integration.helper';
|
||||
|
||||
describe('POST /user/tasks', () => {
|
||||
|
||||
let user;
|
||||
|
||||
beforeEach(async () => {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import {
|
||||
generateUser,
|
||||
translate as t,
|
||||
} from '../../../../helpers/api-integration.helper';
|
||||
|
||||
describe('PUT /user/tasks/:id', () => {
|
||||
@@ -34,13 +33,13 @@ describe('PUT /user/tasks/:id', () => {
|
||||
text: 'new text',
|
||||
notes: 'new notes',
|
||||
value: 10000,
|
||||
priority: .5,
|
||||
priority: 0.5,
|
||||
attribute: 'str',
|
||||
}).then((updatedTask) => {
|
||||
expect(updatedTask.text).to.eql('new text');
|
||||
expect(updatedTask.notes).to.eql('new notes');
|
||||
expect(updatedTask.value).to.eql(10000);
|
||||
expect(updatedTask.priority).to.eql(.5);
|
||||
expect(updatedTask.priority).to.eql(0.5);
|
||||
expect(updatedTask.attribute).to.eql('str');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user