Created
September 6, 2010 23:45
-
-
Save dpmcnevin/567649 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 HostsControllerTest < ActionController::TestCase | |
context "Logged in as admin" do | |
setup do | |
@user = Factory.build(:admin_user) ## build, not create since it won't hit the database then | |
HostsController.any_instance.stubs(:current_user).returns(@user) | |
end | |
context "on INDEX action" do | |
setup do | |
get :index | |
end | |
should respond_with(:success) | |
should render_template(:index) | |
should respond_with_content_type(:html) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment