sandbox redirect now depends on test_mode flag instead of Rails.env