Create restful invites controller and ajaxified the workflow.

This commit is contained in:
Benjamin Meichsner 2009-08-02 19:41:09 +02:00
parent 5cf75ee32a
commit 178fba7b30
11 changed files with 89 additions and 52 deletions

View file

@ -0,0 +1,20 @@
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