public
Created

test for force_ssl

  • Download Gist
force_ssl_test.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12
class ForceSSLWithExtraOptions < ForceSSLController
force_ssl :only => :cheeseburger, :port => 4000, :status => :temporary_redirect
end
 
class ForceSSLWithExtraOptionsTest < ActionController::TestCase
tests ForceSSLWithExtraOptions
 
def test_cheeseburger_redirects_and_calls_force_ssl_redirect
@controller.expects(:force_ssl_redirect).with(nil, {port: 4000, status: :temporary_redirect})
get :cheeseburger
end
end

the other tests break. should i create another test file ?

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.