Skip to content
This repository has been archived by the owner on Mar 19, 2019. It is now read-only.

Bug 978455. Add a POST /registration URL. #19

Closed
wants to merge 2 commits into from
Closed

Conversation

almet
Copy link
Contributor

@almet almet commented Mar 1, 2014

Also test the authentication in a different "describe" for the tests, as it's
not really possible to test that for each route.

Each route that needs the user to be authenticated can check that the
middleware is installed.

expect(res.headers['www-authenticate']).to.eql('BrowserID');
done();
});
});
Copy link
Contributor

Choose a reason for hiding this comment

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

This test looks to be a duplicate of the first test in this set.

Also test the authentication in a different "describe" for the tests, as it's
not really possible to test that for each route.

Each route that needs the user to be authenticated can check that the
middleware is installed.
function getMiddlewares(method, url) {
return app.routes[method].filter(function(e){
if (e.path === url)
return e;
Copy link
Contributor

Choose a reason for hiding this comment

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

A filter fn should return a boolean; here you could just return return e.path === url;

@almet almet closed this Mar 4, 2014
@almet almet deleted the registration branch March 18, 2014 09:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants