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

site.followRedirect needs unit tests #19

Open
guyellis opened this issue Oct 9, 2014 · 3 comments
Open

site.followRedirect needs unit tests #19

guyellis opened this issue Oct 9, 2014 · 3 comments

Comments

@guyellis
Copy link
Owner

guyellis commented Oct 9, 2014

In uriCheck.js we set followRedirect to false. This should be configurable per site and default to false if missing which will allow for checking collections of shortUrls and their ultimate destinations.

@ckross01
Copy link
Collaborator

looking for a config based approach for the setting or do you just want it passed into the uriCheck module from the manager?

@guyellis
Copy link
Owner Author

I'm thinking that it should be part of the site object that's passed into the checkUri() function. So when the options object is setup around lines 28 to 31 the followRedirect is set to !!site.followRedirect. That way everything should continue to function as usual but it can be set to true for any site in the samplesites.js or for all sites using the allSites object. Does that make sense?

@guyellis
Copy link
Owner Author

site.followRedirect has been added, however it needs unit tests. Probably using something like sinon to stub request.

@guyellis guyellis changed the title Make redirect configurable per site site.followRedirect needs unit tests Oct 11, 2014
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

No branches or pull requests

2 participants