Last active
July 22, 2020 01:07
-
-
Save amrvitale/a04d794a5978e0e2b9d2be295c4aa994 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { expect } = require('chai'); | |
const supertest = require('supertest'); | |
const app = require('../app'); | |
describe('GET /drafting', () => { | |
it('should return an draftling/s page', () => { | |
return supertest(app) | |
.get('/') | |
.expect(200) | |
.expect('Content-Type', /json/) | |
.then(res => { | |
expect(res.body).to.be.an('array'); | |
}); | |
}) | |
}); | |
describe('POST /draftling', () => { | |
it('should post a draftling', () => { | |
return supertest(app) | |
.post('/') | |
.expect(200) | |
.expect('Content-Type', /json/) | |
.then(res => { | |
expect(res.body).to.be.an('object'); | |
}); | |
}) | |
}) | |
describe('PUT /draftling', () => { | |
it('should return an draftling/s page', () => { | |
return supertest(app) | |
.put('/') | |
.expect(200) | |
.expect('Content-Type', /json/) | |
.then(res => { | |
expect(res.body).to.be.an('array'); | |
}); | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment