diff options
Diffstat (limited to 'engines/support/test')
-rw-r--r-- | engines/support/test/functional/tickets_controller_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/support/test/functional/tickets_controller_test.rb b/engines/support/test/functional/tickets_controller_test.rb index 5c2b346..2f1e661 100644 --- a/engines/support/test/functional/tickets_controller_test.rb +++ b/engines/support/test/functional/tickets_controller_test.rb @@ -78,6 +78,16 @@ class TicketsControllerTest < ActionController::TestCase assert_nil assigns(:tickets).detect{|t| t.created_by != @user} end + + test "should rerender form on missing info" do + params = { :subject => "unauth ticket test subject", + :comments_attributes => {"0" => {}} + } + assert_raises ActionController::ParameterMissing do + post :create, :ticket => params + end + end + test "should create unauthenticated ticket" do params = {:subject => "unauth ticket test subject", :comments_attributes => {"0" => {"body" =>"body of test ticket"}}} |