require 'test_helper'

class AdminControllerTest < ActionController::TestCase
  test 'user must login' do
    get :status
    assert_redirected_to user_session_path
  end

  test 'normal user must not see admin status' do
    sign_in users(:normal)
    get :status
    assert_response :forbidden
  end

  test 'admin can see status' do
    sign_in users(:admin)
    get :status
    assert_response :success
  end

end
