Remove tutorial route tests

This commit is contained in:
Johannes Zellner
2017-01-17 13:05:47 +01:00
parent a0ef86f287
commit d89324162f

View File

@@ -278,45 +278,4 @@ describe('Profile API', function () {
});
});
});
describe('showTutorial change', function () {
before(setup);
after(cleanup);
it('fails due to missing showTutorial', function (done) {
superagent.post(SERVER_URL + '/api/v1/profile/tutorial')
.query({ access_token: token_0 })
.send({})
.end(function (err, res) {
expect(res.statusCode).to.equal(400);
done();
});
});
it('fails due to wrong showTutorial type', function (done) {
superagent.post(SERVER_URL + '/api/v1/profile/tutorial')
.query({ access_token: token_0 })
.send({ showTutorial: 'true' })
.end(function (err, res) {
expect(res.statusCode).to.equal(400);
done();
});
});
it('succeeds', function (done) {
superagent.post(SERVER_URL + '/api/v1/profile/tutorial')
.query({ access_token: token_0 })
.send({ showTutorial: false })
.end(function (err, res) {
expect(res.statusCode).to.equal(204);
superagent.get(SERVER_URL + '/api/v1/profile/').query({ access_token: token_0 }).end(function (error, result) {
expect(result.statusCode).to.equal(200);
expect(result.body.showTutorial).to.not.be.ok();
done();
});
});
});
});
});