-
Notifications
You must be signed in to change notification settings - Fork 60
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
Conversation
handlers/people_test.go
Outdated
} | ||
|
||
rctx := chi.NewRouteContext() | ||
rctx.URLParams.Add("search", "John") |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elraphty Addressed
handlers/people_test.go
Outdated
expectedPeople := []db.Person{} | ||
|
||
rctx := chi.NewRouteContext() | ||
rctx.URLParams.Add("search", "user not matched") |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed
handlers/people_test.go
Outdated
|
||
rctx := chi.NewRouteContext() | ||
rctx.URLParams.Add("page", "1") | ||
rctx.URLParams.Add("limit", "10") |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed
handlers/people_test.go
Outdated
} | ||
|
||
rctx := chi.NewRouteContext() | ||
rctx.URLParams.Add("page", "1") |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed
handlers/people_test.go
Outdated
rctx := chi.NewRouteContext() | ||
rctx.URLParams.Add("page", "1") | ||
rctx.URLParams.Add("limit", "10") | ||
rctx.URLParams.Add("languages", "typescript") |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed
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.
Checklist before requesting a review