makes manager a HashWithIndifferentAccess
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
class ManagerAuthenticator
|
class ManagerAuthenticator
|
||||||
|
|
||||||
def initialize(data={})
|
def initialize(data={})
|
||||||
@manager = {login: data[:login], user_key: data[:clave_usuario], date: data[:fecha_conexion]}
|
@manager = {login: data[:login], user_key: data[:clave_usuario], date: data[:fecha_conexion]}.with_indifferent_access
|
||||||
end
|
end
|
||||||
|
|
||||||
def auth
|
def auth
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ module CommonActions
|
|||||||
|
|
||||||
def login_as_manager
|
def login_as_manager
|
||||||
login, user_key, date = "JJB042", "31415926", Time.now.strftime("%Y%m%d%H%M%S")
|
login, user_key, date = "JJB042", "31415926", Time.now.strftime("%Y%m%d%H%M%S")
|
||||||
allow_any_instance_of(ManagerAuthenticator).to receive(:auth).and_return({login: login, user_key: user_key, date: date})
|
allow_any_instance_of(ManagerAuthenticator).to receive(:auth).and_return({login: login, user_key: user_key, date: date}.with_indifferent_access)
|
||||||
visit management_sign_in_path(login: login, clave_usuario: user_key, fecha_conexion: date)
|
visit management_sign_in_path(login: login, clave_usuario: user_key, fecha_conexion: date)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user