thoughtbot / carnival

An unobtrusive, developer-friendly way to add comments
MIT License
499 stars 30 forks source link

Extract, improve, and test authenticateUser #188

Closed pbrisbin closed 9 years ago

pbrisbin commented 9 years ago

This code has actually been a source of bugs. With the new scaffold's Import.NoFoundation we're able to extract more code out of Foundation without running into circular imports. Moving this to Model.User made it easy to test.

pbrisbin commented 9 years ago

Hmm, looks like this is changing behavior that isn't caught but the test coverage I added. Will have to dig in some more before this is ready for review

pbrisbin commented 9 years ago

So the difference is the known user / missing profile case. If we find the user, but the profile's empty we still consider that valid athentication. Will add a test case and fix.