Sha256: 338c3dd4a639afb731798fdfcc119c5163e43f7240290cc7e62a0747c2299b0d

Contents?: true

Size: 435 Bytes

Versions: 12

Compression:

Stored size: 435 Bytes

Contents

require 'test_helper'

class SessionControllerTest < ActionController::TestCase
  setup do
    @user = users(:john)
  end
  
  test "user home page" do
    set_session_current_user @user
    get :show
    
    assert_equal @user, assigns(:user)
    assert_select 'a', 'Log out'
  end
  
  test "application welcome page" do
    get :show
    
    assert_equal User.count, assigns(:user_count)
    assert_select 'a', 'Log in'
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
authpwn_rails-0.6.0 lib/authpwn_rails/generators/templates/session_controller_test.rb
authpwn_rails-0.5.6 lib/authpwn_rails/generators/templates/session_controller_test.rb
authpwn_rails-0.5.5 lib/authpwn_rails/generators/templates/session_controller_test.rb
authpwn_rails-0.5.4 lib/authpwn_rails/generators/templates/session_controller_test.rb
authpwn_rails-0.5.3 lib/authpwn_rails/generators/templates/session_controller_test.rb
authpwn_rails-0.5.2 lib/authpwn_rails/generators/templates/session_controller_test.rb
authpwn_rails-0.5.1 lib/authpwn_rails/generators/templates/session_controller_test.rb
authpwn_rails-0.5.0 lib/authpwn_rails/generators/templates/session_controller_test.rb
authpwn_rails-0.4.7 lib/authpwn_rails/generators/templates/session_controller_test.rb
authpwn_rails-0.4.6 lib/authpwn_rails/generators/templates/session_controller_test.rb
authpwn_rails-0.4.5 lib/authpwn_rails/generators/templates/session_controller_test.rb
authpwn_rails-0.4.4 lib/authpwn_rails/generators/templates/session_controller_test.rb