Skip to content

Commit

Permalink
Change route for accompanying passenger
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblurie29 committed Feb 25, 2024
1 parent 86ecaee commit 8ad38ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/routes/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const routes = (app: Express) => {
app.get('/test/retrievePassengers', retrievePassengers);

/* Passenger Controller Routes */
app.get('/passenger/', getAllPassengersForUser);
app.get('/passenger/accompanying', getAllPassengersForUser);
app.get('/passenger/:id', getPassengerById);
app.post('/passenger/', createPassenger);
app.put('/passenger/:id', updatePassenger);
Expand Down
10 changes: 5 additions & 5 deletions src/tests/Passenger.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ after(done => {
// describe is group of tests
// it is the actual test itself
// Test case
describe('GET /passenger', () => {
describe('GET /passenger/accompanying', () => {
it('should return a 400 response', done => {
chai
.request(app)
.get('/passenger')
.get('/passenger/accompanying')
.query({ id: '' })
.end((err, res) => {
expect(res).to.have.status(400);
Expand All @@ -43,7 +43,7 @@ describe('GET /passenger', () => {
it('should be an accompanying passenger', done => {
chai
.request(app)
.get('/passenger')
.get('/passenger/accompanying')
.query({ id: 'recleNlsBm3dheZHy' })
.end((err, res) => {
expect(res.body[0]['First Name']).to.be.oneOf([
Expand All @@ -58,7 +58,7 @@ describe('GET /passenger', () => {
it('should be an accompanying passenger', done => {
chai
.request(app)
.get('/passenger')
.get('/passenger/accompanying')
.query({ id: 'recleNlsBm3dheZHy' })
.end((err, res) => {
expect(res.body[1]['Gender']).to.equal('Male');
Expand All @@ -69,7 +69,7 @@ describe('GET /passenger', () => {
it('should be an accompanying passenger', done => {
chai
.request(app)
.get('/passenger')
.get('/passenger/accompanying')
.query({ id: 'recleNlsBm3dheZHy' })
.end((err, res) => {
expect(res.body[2]['Relationship']).to.be.oneOf(['Father', undefined]);
Expand Down

0 comments on commit 8ad38ed

Please sign in to comment.