Created
June 23, 2011 21:05
-
-
Save jslag/1043625 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test_helper' | |
class EntriesAdminControllerTest < ActionController::TestCase | |
tests Admin::EntriesController | |
include Devise::TestHelpers | |
def setup | |
@admin = Factory.create(:user) | |
end | |
test "can access admin-only features " do | |
sign_in @admin | |
get :index | |
assert_response :success | |
# can now test admin code! | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment