Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#167749958 Return trip endpoint #27

Merged
merged 1 commit into from
Sep 12, 2019
Merged

Conversation

hustlaviola
Copy link
Collaborator

What does this PR do?

This PR implements return trip endpoint

Description of Tasks

  • Update the existing test suite for this endpoint
  • Update the validation Schema
  • Validate the request body
  • Update the controller class with return functionality
  • Refactor tests to ensure all cases are passing
  • Update Swagger documentation

How should this be manually tested?

  • Clone the Repo, change into the directory and run npm install
  • Run npm test to see all test cases
  • Run npm dev to start the server
  • Make a POST request to http://localhost:{PORT}/api/v1/requests on Postman using valid credentials

Sample request body

{
    "origin": "Lagos",
    "destination": "London",
    "type": "return",
    "departureDate": "2020-10-11",
    "returnDate": "2021-10-11",
    "reason": "Moving to a new office location",
    "accommodation": "Buckingham Palace"
}

Background context

  • Departure cannot be set to a date before the present
  • Return cannot be set to a date before departure

Relevant pivotal tracker story

167749958

Screenshots

Screenshot (146)

Screenshot (145)

@hustlaviola hustlaviola changed the title #167749958 Implement return trip endpoint #167749958 Return trip endpoint Sep 10, 2019
@hustlaviola hustlaviola force-pushed the ft-return-trip-167749958 branch 3 times, most recently from 0b4ecfd to cd05e48 Compare September 11, 2019 23:44
 - update the existing test suite for this endpoint
 - update the `validation` Schema
 - validate the request body
 - update the controller class with `return`nfunctionality
 - refactor tests to ensure all cases are passing
 - update Swagger documentation

[Finishes #167749958]
Copy link
Collaborator

@Naimaoye Naimaoye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job victor

Copy link
Contributor

@ascii-dev ascii-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ascii-dev ascii-dev merged commit f0d49bd into develop Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants