Skip to content

Commit b1d06fe

Browse files
authored
Merge pull request #121 from maschwenk/chore.fix-rails-6-deprecations
[CHORE] Fix Rails 6 deprecations
2 parents 86ff20e + 554c166 commit b1d06fe

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

test/action_controller_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def test_doesnt_write_session_cookie_if_session_id_is_already_exists
187187

188188
get '/get_session_value'
189189
assert_response :success
190-
assert_equal nil, headers['Set-Cookie'], "should not resend the cookie again if session_id cookie is already exists"
190+
assert_nil headers['Set-Cookie'], "should not resend the cookie again if session_id cookie is already exists"
191191
end
192192
end
193193

test/destroy_session_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_destroy_without_renew
2727
s.destroy
2828

2929
renewed_session_model = req.env[record_key]
30-
assert_equal nil, renewed_session_model.data['rails']
30+
assert_nil renewed_session_model.data['rails']
3131
end
3232

3333
def test_destroy_with_renew

test/helper.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,11 @@ def self.build_app(routes = nil)
3838

3939
def with_test_route_set(options = {})
4040
controller_namespace = self.class.to_s.underscore
41+
actions = %w[set_session_value get_session_value call_reset_session renew get_session_id]
4142

4243
with_routing do |set|
4344
set.draw do
44-
get ':action', :controller => "#{controller_namespace}/test"
45+
actions.each { |action| get action, controller: "#{controller_namespace}/test" }
4546
end
4647

4748
@app = self.class.build_app(set) do |middleware|

0 commit comments

Comments
 (0)