Skip to content

Commit

Permalink
Fixed test structure
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblurie29 committed Feb 25, 2024
1 parent 00744d8 commit 2770638
Showing 1 changed file with 71 additions and 71 deletions.
142 changes: 71 additions & 71 deletions src/tests/Passenger.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,76 +73,76 @@ describe('GET /passenger', () => {
done();
});
});
describe('PUT passenger/:id', () => {
it('should return a 400 response', done => {
chai
.request(app)
.put('/passenger/junk')
.send({ id: '' })
.end((err, res) => {
expect(res).to.have.status(400);
done();
});
});
it('should return a 400 response', done => {
chai
.request(app)
.put('/passenger/junk')
.send({ passengerData: '' })
.end((err, res) => {
expect(res).to.have.status(400);
done();
});
});
it('should update street for anakin skywalker', done => {
chai
.request(app)
.put('/passenger/rec3Wv1VViXYv3t72')
.send({ Street: 'HELLOSTREET' })
.end((err, res) => {
expect(res).to.have.status(200);
done();
});
});
it('should update marital status for princess leia', done => {
chai
.request(app)
.put('/passenger/recaUmd14q3YOP3Uf')
.send({ 'Marital Status': 'Married' })
.end((err, res) => {
expect(res).to.have.status(200);
done();
});
});
it('should update household size for princess leia', done => {
chai
.request(app)
.put('/passenger/recaUmd14q3YOP3Uf')
.send({ 'Household Size': 3 })
.end((err, res) => {
expect(res).to.have.status(200);
done();
});
});
it('should return a 400 response', done => {
chai
.request(app)
.put('/passenger/recaUmd14q3YOP3Uf')
.send({ 'Household Size': 'test' })
.end((err, res) => {
expect(res).to.have.status(400);
done();
});
});
it('should update email for jefferson morales', done => {
chai
.request(app)
.put('/passenger/recLFdznCJOUPEx72')
.send({ Email: '[email protected]' })
.end((err, res) => {
expect(res).to.have.status(200);
done();
});
});
});
describe('PUT passenger/:id', () => {
it('should return a 400 response', done => {
chai
.request(app)
.put('/passenger/junk')
.send({ id: '' })
.end((err, res) => {
expect(res).to.have.status(400);
done();
});
});
it('should return a 400 response', done => {
chai
.request(app)
.put('/passenger/junk')
.send({ passengerData: '' })
.end((err, res) => {
expect(res).to.have.status(400);
done();
});
});
it('should update street for anakin skywalker', done => {
chai
.request(app)
.put('/passenger/rec3Wv1VViXYv3t72')
.send({ Street: 'HELLOSTREET' })
.end((err, res) => {
expect(res).to.have.status(200);
done();
});
});
it('should update marital status for princess leia', done => {
chai
.request(app)
.put('/passenger/recaUmd14q3YOP3Uf')
.send({ 'Marital Status': 'Married' })
.end((err, res) => {
expect(res).to.have.status(200);
done();
});
});
it('should update household size for princess leia', done => {
chai
.request(app)
.put('/passenger/recaUmd14q3YOP3Uf')
.send({ 'Household Size': 3 })
.end((err, res) => {
expect(res).to.have.status(200);
done();
});
});
it('should return a 400 response', done => {
chai
.request(app)
.put('/passenger/recaUmd14q3YOP3Uf')
.send({ 'Household Size': 'test' })
.end((err, res) => {
expect(res).to.have.status(400);
done();
});
});
it('should update email for jefferson morales', done => {
chai
.request(app)
.put('/passenger/recLFdznCJOUPEx72')
.send({ Email: '[email protected]' })
.end((err, res) => {
expect(res).to.have.status(200);
done();
});
});
});

0 comments on commit 2770638

Please sign in to comment.