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
Derive param key from admin user class in sessions controller #210
Conversation
Also fixes some minitest warnings and temporarily removes codeclimate
@jensljungblad I just did a manual test for this and it worked fine. I also updated the changelog. Can we write a good test for this somehow? It's a bit annoying because I guess we'd have to have another dummy app... |
@Linuus Depends on if we need an integration test or not. If we do, I think a separate class SessionsControllerWithAnotherAdminUser < ApplicationController
include Godmin::Authentication::SessionsController
include Godmin::Authentication
def admin_user_class
AnotherAdminUser
end
end And then a separate route. But I think maybe its enough with something that tests the |
@jensljungblad That's true. I'll see what I can come up with. |
@jensljungblad Pushed a test for this now. Merge? EDIT: They are failing in Rails < 5 because they changed syntax in the tests. |
cc3a672
to
5725d04
Compare
Ok, tests updated again. I'm using the old style now, without the |
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.
Other than the fact that our integration test setup is beginning to feel a bit ridiculous (which has nothing to do with this PR) it looks good to me!
(We did some weird workaround for another function that changed between Rails 4 and 5, but perhaps we should get back to this once Rails 5.1 is released) |
Also fixes some minitest warnings and temporarily removes
codeclimate
Fixes #209
@jensljungblad Can you test this? My laptop has some issues so I can't create a new project at the moment.