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

add test for non existing document to see if CORS is correct #26

Open
ghost opened this issue Oct 15, 2015 · 5 comments
Open

add test for non existing document to see if CORS is correct #26

ghost opened this issue Oct 15, 2015 · 5 comments

Comments

@ghost
Copy link

ghost commented Oct 15, 2015

My code has a different flow for exceptions (i.e. file does not exist) and the exceptions didn't add CORS headers...

@raucao
Copy link
Member

raucao commented Oct 16, 2015

Wait, was it a 500? Then the non-existing doc (which is tested I believe) would be a random thing to test for, if what you actually want is trigger a 500.

@ghost
Copy link
Author

ghost commented Oct 16, 2015

No, it was a 404. I guess it doesn't make that much sense actually to test this since a 404 is 'expected behavior'. It is just that in my implementation they follow a different program flow for which I initially forgot to add CORS. That is fixed now, so it can't happen anymore, but I thought other implementation may be similar in having a different flow for 'failures'.

@raucao
Copy link
Member

raucao commented Oct 16, 2015

We should totally add a test for 404s then. Very easy.

@untitaker
Copy link
Member

What if we checked the CORS headers inside do_put_request et al?

@raucao
Copy link
Member

raucao commented Nov 6, 2015

Yes, makes sense I assume.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants