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

Backend [Integration Test] people.go handlers GetPeopleBySearch, GetListedPeople, & GetPersonByUuid #1531

Merged
merged 3 commits into from
Feb 20, 2024

Conversation

AbdulWahab3181
Copy link
Contributor

Describe your changes

Added Unit test for people handler to test GetPeopleBySearch, GetListedPeople and GetPersonByUuid methods

Issue ticket number and link

Closes #1518

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have tested on Chrome and Firefox
  • I have tested on a mobile device
  • I have provided a screenshot or recording of changes in my PR if there were updates to the frontend

@AbdulWahab3181 AbdulWahab3181 marked this pull request as ready for review February 19, 2024 17:03
}

rctx := chi.NewRouteContext()
rctx.URLParams.Add("search", "John")
Copy link
Contributor

Choose a reason for hiding this comment

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

@AbdulWahab3181 the search should be in the URL query, not param.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@elraphty Addressed

expectedPeople := []db.Person{}

rctx := chi.NewRouteContext()
rctx.URLParams.Add("search", "user not matched")
Copy link
Contributor

Choose a reason for hiding this comment

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

@AbdulWahab3181 the search should be in the URL query, not param.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed


rctx := chi.NewRouteContext()
rctx.URLParams.Add("page", "1")
rctx.URLParams.Add("limit", "10")
Copy link
Contributor

Choose a reason for hiding this comment

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

@AbdulWahab3181 the limit and page should be in the URL query, not param.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed

}

rctx := chi.NewRouteContext()
rctx.URLParams.Add("page", "1")
Copy link
Contributor

Choose a reason for hiding this comment

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

@AbdulWahab3181 the limit, page, and search should be in the URL query, not param.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed

rctx := chi.NewRouteContext()
rctx.URLParams.Add("page", "1")
rctx.URLParams.Add("limit", "10")
rctx.URLParams.Add("languages", "typescript")
Copy link
Contributor

Choose a reason for hiding this comment

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

@AbdulWahab3181 the page, limit, and languages should be in the URL query, not the param.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed

@elraphty elraphty merged commit f247c84 into stakwork:master Feb 20, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backend [Integration Test] people.go handlers GetPeopleBySearch, GetListedPeople, & GetPersonByUuid
2 participants