mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 03:06:14 +02:00
Refactor Devise integration
- Use scoped users - Use the named route helpers instead of hardcoded paths
This commit is contained in:
parent
c31f507c25
commit
9684c8e59f
52 changed files with 313 additions and 280 deletions
|
@ -1,11 +1,11 @@
|
|||
module Requests
|
||||
module SessionHelpers
|
||||
def sign_in_to_admin_area(user: create(:admin_user))
|
||||
post admin_sessions_path, admin_user: { username: user.username, password: user.password }
|
||||
post admin_user_session_path, admin_user: { username: user.username, password: user.password }
|
||||
end
|
||||
|
||||
def sign_in_to_registrar_area(user: create(:api_user))
|
||||
post registrar_sessions_path, { depp_user: { tag: user.username, password: user.password } }
|
||||
post registrar_user_session_path, { depp_user: { tag: user.username, password: user.password } }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue