Fix all Layout/SpaceBeforeComma rubocop issues and remove from rubocop_todo list

This commit is contained in:
Bertocq
2017-06-21 22:34:50 +02:00
parent 6562d8b9d8
commit 9763931f55
5 changed files with 7 additions and 15 deletions

View File

@@ -5,15 +5,15 @@ describe Management::SessionsController do
describe 'Sign in' do
it "should deny access if wrong manager credentials" do
allow_any_instance_of(ManagerAuthenticator).to receive(:auth).and_return(false)
expect { get :create, login: "nonexistent" , clave_usuario: "wrong"}.to raise_error CanCan::AccessDenied
expect { get :create, login: "nonexistent", clave_usuario: "wrong"}.to raise_error CanCan::AccessDenied
expect(session[:manager]).to be_nil
end
it "should redirect to management root path if authorized manager with right credentials" do
manager = {login: "JJB033", user_key: "31415926" , date: "20151031135905"}
manager = {login: "JJB033", user_key: "31415926", date: "20151031135905"}
allow_any_instance_of(ManagerAuthenticator).to receive(:auth).and_return(manager)
get :create, login: "JJB033" , clave_usuario: "31415926", fecha_conexion: "20151031135905"
get :create, login: "JJB033", clave_usuario: "31415926", fecha_conexion: "20151031135905"
expect(response).to be_redirect
expect(session[:manager][:login]).to eq "JJB033"
end