Sha256: 3774186d2729bde33811b61945be857acf9e852ad0cd79db5fea70c168a605b0
Contents?: true
Size: 814 Bytes
Versions: 7
Compression:
Stored size: 814 Bytes
Contents
require 'test_helper' module Spina module Admin class SessionsControllerTest < ActionController::TestCase setup do @routes = ::Spina::Engine.routes end test "login renders the correct layout" do get :new assert_template layout: 'spina/login' end test "should be able to login" do post :create, email: spina_users(:bram).email, password: "password" assert_not_nil session[:user_id] end test "should be able to logout" do get :destroy assert_nil session[:user_id] end test "should alert the user when wrong password" do post :create, email: spina_users(:bram).email, password: "1234" assert_nil session[:user_id] assert_not_empty flash[:alert] end end end end
Version data entries
7 entries across 7 versions & 1 rubygems