-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
31 lines (25 loc) · 777 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const chai = require('chai');
const chaiHttp = require('chai-http');
const app = require('../ejer3/express_var');
chai.use(chaiHttp);
chai.should();
describe("Vivienda", () => {
it ("/ debe ser objeto", (done) => {
chai.request(app)
.get('/')
.end((err, res) => {
res.should.have.status(200);
res.body.should.be.a('object');
done();
});
});
it ("/vivienda debe ser objeto", (done) => {
chai.request(app)
.get('/vivienda?calle=Alhondiga&portal=3&piso=1&letra=E')
.end((err, res) => {
res.should.have.status(200);
res.body.should.be.a('object');
done();
});
});
});