it('partially update timeline template - forbidden', async () => { const response = await chai.request(app) .patch(`${basePath}/${id}`) .set('Authorization', `Bearer ${config.M2M_READ_ACCESS_TOKEN}`) .send({ name: 'testing2' }) should.equal(response.status, 403) should.equal(response.body.message, 'You are not allowed to perform this action!') })
it('create timeline template - forbidden', async () => { const response = await chai.request(app) .post(basePath) .set('Authorization', `Bearer ${config.M2M_READ_ACCESS_TOKEN}`) .send({ name, description: 'desc', isActive: true, phases: [{ phaseId: phase.id, predecessor, defaultDuration: 123 }] }) should.equal(response.status, 403) should.equal(response.body.message, 'You are not allowed to perform this action!') })
it('search challenges successfully 3', async () => { const response = await chai.request(app) .get(basePath) .set('Authorization', `Bearer ${config.M2M_READ_ACCESS_TOKEN}`) .query({ page: 1,
.set('Authorization', `Bearer ${config.M2M_READ_ACCESS_TOKEN}`) .query({ page: 1,
it('create challenge type timeline template - forbidden', async () => { const response = await chai.request(app) .post(basePath) .set('Authorization', `Bearer ${config.M2M_READ_ACCESS_TOKEN}`) .send({ typeId: type.id, timelineTemplateId: timelineTemplate.id }) should.equal(response.status, 403) should.equal(response.body.message, 'You are not allowed to perform this action!') })
it('create challenge type - forbidden', async () => { const response = await chai.request(app) .post(basePath) .set('Authorization', `Bearer ${config.M2M_READ_ACCESS_TOKEN}`) .send({ name: 'flskjdf', description: 'desc', isActive: false, abbreviation: 'abb' }) should.equal(response.status, 403) should.equal(response.body.message, 'You are not allowed to perform this action!') })
it('partially update challenge type - forbidden', async () => { const response = await chai.request(app) .patch(`${basePath}/${id}`) .set('Authorization', `Bearer ${config.M2M_READ_ACCESS_TOKEN}`) .send({ name: 'testing2' }) should.equal(response.status, 403) should.equal(response.body.message, 'You are not allowed to perform this action!') })
it('partially update phase - forbidden', async () => { const response = await chai.request(app) .patch(`${basePath}/${id}`) .set('Authorization', `Bearer ${config.M2M_READ_ACCESS_TOKEN}`) .send({ name: 'testing2' }) should.equal(response.status, 403) should.equal(response.body.message, 'You are not allowed to perform this action!') })
it('create challenge - forbidden', async () => { const response = await chai.request(app) .post(basePath) .set('Authorization', `Bearer ${config.M2M_READ_ACCESS_TOKEN}`) .send(testChallengeData) should.equal(response.status, 403) should.equal(response.body.message, 'You are not allowed to perform this action!') })
it('partially update challenge - forbidden', async () => { const response = await chai.request(app) .patch(`${basePath}/${id}`) .set('Authorization', `Bearer ${config.M2M_READ_ACCESS_TOKEN}`) .send({ name: 'testing2' }) should.equal(response.status, 403) should.equal(response.body.message, 'You are not allowed to perform this action!') })
it('create phase - forbidden', async () => { const response = await chai.request(app) .post(basePath) .set('Authorization', `Bearer ${config.M2M_READ_ACCESS_TOKEN}`) .send({ name: 'flskjdf', description: 'desc', isOpen: false, duration: 456 }) should.equal(response.status, 403) should.equal(response.body.message, 'You are not allowed to perform this action!') })