-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add user parameter to projects. #290
Conversation
On a side note, I think that we should refactor the times tests to look more like this. One list of all times, then use filter() and map() to get the expected results for a given test, instead of redefining the whole list every time. It'll make it easier to maintain and reduce unnecessary redundancy. |
These tests look good. To address the side note I would not refactor the time tests unless you find yourself working on the time tests anyway. |
Agreed. |
@@ -198,6 +198,47 @@ module.exports = function(expect, request, baseUrl) { | |||
}); | |||
}); | |||
|
|||
describe('GET /projects?user=:username', function() { | |||
it('returns all times for a user', function(done) { |
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.
you mean "returns all projects for a user"?
Another note for a tests refactor - we should really replace user/project/activity names with generic names like user1, user2, project1, project2, (or valid_user_1, invalid_project, etc) rather than have gwm and tschuy all over our test data. A recursive /tschuy/user_1/ should take care of that pretty easily. |
LGTM +1 |
+1 |
fixes issue #289
Changes in this PR.
Testing this PR.
npm test
./projects?user=tschuy
.Expected Output.
@osuosl/devs