foodsoft/test/functional/invites_controller_test.rb

21 lines
413 B
Ruby
Raw Normal View History

require 'test_helper'
class InvitesControllerTest < ActionController::TestCase
def test_new
get :new
assert_template 'new'
end
def test_create_invalid
Invite.any_instance.stubs(:valid?).returns(false)
post :create
assert_template 'new'
end
def test_create_valid
Invite.any_instance.stubs(:valid?).returns(true)
post :create
assert_redirected_to root_url
end
end