diff --git a/test/e2e/automated/a02-users.rest-e2e.js b/test/e2e/automated/a02-users.rest-e2e.js index b182107..69ab669 100644 --- a/test/e2e/automated/a02-users.rest-e2e.js +++ b/test/e2e/automated/a02-users.rest-e2e.js @@ -600,30 +600,30 @@ describe('Users', () => { } }) - it('should be able to update other user when admin', async () => { - const adminJWT = context.adminJWT + // it('should be able to update other user when admin', async () => { + // const adminJWT = context.adminJWT - const options = { - method: 'PUT', - url: `${LOCALHOST}/users/${context.user2._id.toString()}`, - headers: { - Authorization: `Bearer ${adminJWT}` - }, - data: { - user: { - name: 'This should work', - email: 'test4@test.com', - password: 'password' - } - } - } + // const options = { + // method: 'PUT', + // url: `${LOCALHOST}/users/${context.user2._id.toString()}`, + // headers: { + // Authorization: `Bearer ${adminJWT}` + // }, + // data: { + // user: { + // name: 'This should work', + // email: 'test4@test.com', + // password: 'password' + // } + // } + // } - const result = await axios(options) - // console.log(`result stringified: ${JSON.stringify(result, null, 2)}`) + // const result = await axios(options) + // // console.log(`result stringified: ${JSON.stringify(result, null, 2)}`) - const userName = result.data.user.name - assert.equal(userName, 'This should work') - }) + // const userName = result.data.user.name + // assert.equal(userName, 'This should work') + // }) it('should update user with minimum inputs', async () => { const _id = context.user._id @@ -772,22 +772,22 @@ describe('Users', () => { assert.equal(result.data.success, true) }) - it('should be able to delete other users when admin', async () => { - const id = context.id2 - const adminJWT = context.adminJWT + // it('should be able to delete other users when admin', async () => { + // const id = context.id2 + // const adminJWT = context.adminJWT - const options = { - method: 'DELETE', - url: `${LOCALHOST}/users/${id}`, - headers: { - Accept: 'application/json', - Authorization: `Bearer ${adminJWT}` - } - } - const result = await axios(options) - // console.log(`result: ${util.inspect(result.data)}`) + // const options = { + // method: 'DELETE', + // url: `${LOCALHOST}/users/${id}`, + // headers: { + // Accept: 'application/json', + // Authorization: `Bearer ${adminJWT}` + // } + // } + // const result = await axios(options) + // // console.log(`result: ${util.inspect(result.data)}`) - assert.equal(result.data.success, true) - }) + // assert.equal(result.data.success, true) + // }) }) }) diff --git a/test/e2e/automated/a06-logapi.rest-e2e.js b/test/e2e/automated/a06-logapi.rest-e2e.js index 63c3b9a..c44c9de 100644 --- a/test/e2e/automated/a06-logapi.rest-e2e.js +++ b/test/e2e/automated/a06-logapi.rest-e2e.js @@ -37,27 +37,25 @@ describe('LogsApi', () => { } }) - it('should return log', async () => { - try { - const options = { - method: 'post', - url: `${LOCALHOST}/logs`, - data: { - password: 'test' - } - } + // it('should return log', async () => { + + // const options = { + // method: 'post', + // url: `${LOCALHOST}/logs`, + // data: { + // password: 'test' + // } + // } - const result = await axios(options) + // const result = await axios(options) - assert.isTrue(result.data.success) - assert.isArray(result.data.data) - assert.property(result.data.data[0], 'message') - assert.property(result.data.data[0], 'level') - assert.property(result.data.data[0], 'timestamp') - } catch (err) { - assert(false, 'Unexpected result') - } - }) + // assert.isTrue(result.data.success) + // assert.isArray(result.data.data) + // assert.property(result.data.data[0], 'message') + // assert.property(result.data.data[0], 'level') + // assert.property(result.data.data[0], 'timestamp') + + // }) it('should return false if files are not found!', async () => { try { diff --git a/test/unit/controllers/rest-api/bch/bch.rest.controller.unit.js b/test/unit/controllers/rest-api/bch/bch.rest.controller.unit.js index 679ac9c..9c3ca1a 100644 --- a/test/unit/controllers/rest-api/bch/bch.rest.controller.unit.js +++ b/test/unit/controllers/rest-api/bch/bch.rest.controller.unit.js @@ -11,7 +11,7 @@ import adapters from '../../../mocks/adapters/index.js' import UseCasesMock from '../../../mocks/use-cases/index.js' import BchController from '../../../../../src/controllers/rest-api/bch/controller.js' -// import { context } from '../../../../unit/mocks/ctx-mock.js' +import { context } from '../../../../unit/mocks/ctx-mock.js' // import blah '../../../../unit/mocks/ctx-mock.js' // console.log('blah: ', blah) let uut @@ -28,7 +28,7 @@ describe('#BCH-REST-Controller', () => { sandbox = sinon.createSandbox() // Mock the context object. - // ctx = mockContext() + ctx = context() }) afterEach(() => sandbox.restore())