summaryrefslogtreecommitdiff
path: root/engines/support/test
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-05-13 16:23:10 +0200
committerAzul <azul@riseup.net>2016-05-13 16:45:45 +0200
commit12e6c096088a8fb5947a854d2dd385156319b8a6 (patch)
tree4fb0e79ae15a17e8693f4fd660108a1e0632d0be /engines/support/test
parentc52d6bb25702fafb60bf9d8dfb9c1afbd77062c0 (diff)
ensure invalid user ids still render the ticket form
We still have strange urls requested like /pt/users/AnonymousUser.../tickets/new Not sure where they are coming from - but this should make sure we respond with sth. meaningful instead of erroring out.
Diffstat (limited to 'engines/support/test')
-rw-r--r--engines/support/test/functional/tickets_controller_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/support/test/functional/tickets_controller_test.rb b/engines/support/test/functional/tickets_controller_test.rb
index a7a2011..5c2b346 100644
--- a/engines/support/test/functional/tickets_controller_test.rb
+++ b/engines/support/test/functional/tickets_controller_test.rb
@@ -35,6 +35,12 @@ class TicketsControllerTest < ActionController::TestCase
assert_response :success
end
+ test "should get new despite invalid user_id" do
+ get :new, user_id: :bla
+ assert_equal Ticket, assigns(:ticket).class
+ assert_response :success
+ end
+
test "unauthenticated tickets are visible" do
ticket = find_record :ticket, :created_by => nil
get :show, :id => ticket.id