summaryrefslogtreecommitdiff
path: root/engines/support/test/functional/tickets_controller_test.rb
diff options
context:
space:
mode:
authorazul <azul@riseup.net>2014-04-25 12:10:16 +0200
committerazul <azul@riseup.net>2014-04-25 12:10:16 +0200
commit14b43488b968a1544fdb65caa4fb0df99606c3ff (patch)
tree7c837eabc63b940cf4a2ea1cdbcda969ef4e82bd /engines/support/test/functional/tickets_controller_test.rb
parent0968d0009070dea86cb312a2f0ce4a2e8cbac94c (diff)
parent83379a78b0e14d0938f452ef1d23ad94754350ae (diff)
Merge pull request #152 from azul/bugfix/5552-recover-from-invalid-tickets
Bugfix/5552 recover from invalid tickets
Diffstat (limited to 'engines/support/test/functional/tickets_controller_test.rb')
-rw-r--r--engines/support/test/functional/tickets_controller_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/support/test/functional/tickets_controller_test.rb b/engines/support/test/functional/tickets_controller_test.rb
index 416fb73..d746b59 100644
--- a/engines/support/test/functional/tickets_controller_test.rb
+++ b/engines/support/test/functional/tickets_controller_test.rb
@@ -72,6 +72,17 @@ class TicketsControllerTest < ActionController::TestCase
end
+ test "handle invalid ticket" do
+ params = {:subject => "unauth ticket test subject", :comments_attributes => {"0" => {"body" =>"body of test ticket"}}, :email => 'a'}
+
+ assert_no_difference('Ticket.count') do
+ post :create, :ticket => params
+ end
+
+ assert_template :new
+ assert_equal params[:subject], assigns(:ticket).subject
+ end
+
test "should create authenticated ticket" do
params = {:subject => "auth ticket test subject", :comments_attributes => {"0" => {"body" =>"body of test ticket"}}}