summaryrefslogtreecommitdiff
blob: 443aec66c60a1128847a47a31ddc75e8c7a119f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'test_helper'

class Admin::IndexControllerTest < ActionController::TestCase
  test "should work for admins" do
    log_in_as :admin
    get :index
    assert_response :success
  end

  test "should not grant access to regular users" do
    log_in_as :user
    get :index
    assert_redirected_to :controller => '/index', :action => 'error', :type => 'access'
  end
end