Skip to content

Instantly share code, notes, and snippets.

@tammersaleh
Created August 5, 2009 22:07
Show Gist options
  • Select an option

  • Save tammersaleh/163004 to your computer and use it in GitHub Desktop.

Select an option

Save tammersaleh/163004 to your computer and use it in GitHub Desktop.
context "on POST to /user_session/create with good creds" do
setup do
assert_nil UserSession.find
assert_nil @controller.send(:current_user)
@user = Factory(:user, :password => "foobar")
post :create, :user_session => { :email => @user.email, :password => "foobar" }
end
# should_redirect_to("homepage") { root_url }
should_set_the_flash_to /welcome/i
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment