aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-01-29 13:34:02 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-01-29 13:34:02 +1100
commitf18fc44b0feca3000ff1e84e7453ecb244eaec20 (patch)
treec28b31ddb5b9a3164cc5e7d617a07afadd3bbebc
parent531698075c2d20232f110f64a95f705b5bf686f0 (diff)
Fixup up test_code_redirect_by_email_token for rspec 2
-rw-r--r--app/controllers/application_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 9b39d5178..d8206fe76 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -170,6 +170,7 @@ class ApplicationController < ActionController::Base
# Called from test code, is a mimic of UserController.confirm, for use in following email
# links when in controller tests (though we also have full integration tests that
# can work over multiple controllers)
+ # TODO: Move this to the tests. It shouldn't be here
def test_code_redirect_by_email_token(token, controller_example_group)
post_redirect = PostRedirect.find_by_email_token(token)
if post_redirect.nil?
@@ -177,7 +178,7 @@ class ApplicationController < ActionController::Base
end
session[:user_id] = post_redirect.user.id
session[:user_circumstance] = post_redirect.circumstance
- params = controller_example_group.params_from(:get, post_redirect.local_part_uri)
+ params = Rails.application.routes.recognize_path(post_redirect.local_part_uri)
params.merge(post_redirect.post_params)
controller_example_group.get params[:action], params
end