mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-13 15:55:57 +00:00
28 lines
390 B
JavaScript
28 lines
390 B
JavaScript
|
|
const request = require('supertest-as-promised');
|
|
const app = require('../server.js');
|
|
|
|
|
|
const apiPath = '/api/brew';
|
|
|
|
describe('/api/brew', () => {
|
|
|
|
|
|
describe('POST', () => {
|
|
|
|
it('creates a new brew', () => {
|
|
return request(app)
|
|
.post(apiPath)
|
|
.send({
|
|
text : 'Brew Text'
|
|
})
|
|
.expect(200)
|
|
.then((res) => {
|
|
console.log(res.body);
|
|
});
|
|
});
|
|
|
|
});
|
|
|
|
|
|
}); |