-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from ChangePlusPlusVandy/APP-82
Update Passenger Info
- Loading branch information
Showing
3 changed files
with
125 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,3 +74,75 @@ describe('GET /passenger', () => { | |
}); | ||
}); | ||
}); | ||
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(); | ||
}); | ||
}); | ||
}); |