diff options
author | Azul <azul@riseup.net> | 2016-05-13 16:23:10 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2016-05-13 16:45:45 +0200 |
commit | 12e6c096088a8fb5947a854d2dd385156319b8a6 (patch) | |
tree | 4fb0e79ae15a17e8693f4fd660108a1e0632d0be /engines/support/test | |
parent | c52d6bb25702fafb60bf9d8dfb9c1afbd77062c0 (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.rb | 6 |
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 |