diff options
Diffstat (limited to 'actionpack/test/dispatch/middleware_stack_test.rb')
-rw-r--r-- | actionpack/test/dispatch/middleware_stack_test.rb | 43 |
1 files changed, 4 insertions, 39 deletions
diff --git a/actionpack/test/dispatch/middleware_stack_test.rb b/actionpack/test/dispatch/middleware_stack_test.rb index 27da5935b5..e9f7ad41dd 100644 --- a/actionpack/test/dispatch/middleware_stack_test.rb +++ b/actionpack/test/dispatch/middleware_stack_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "abstract_unit" class MiddlewareStackTest < ActiveSupport::TestCase @@ -18,14 +20,6 @@ class MiddlewareStackTest < ActiveSupport::TestCase @stack.use BarMiddleware end - def test_delete_with_string_is_deprecated - assert_deprecated do - assert_difference "@stack.size", -1 do - @stack.delete FooMiddleware.name - end - end - end - def test_delete_works assert_difference "@stack.size", -1 do @stack.delete FooMiddleware @@ -39,24 +33,6 @@ class MiddlewareStackTest < ActiveSupport::TestCase assert_equal BazMiddleware, @stack.last.klass end - test "use should push middleware as a string onto the stack" do - assert_deprecated do - assert_difference "@stack.size" do - @stack.use "MiddlewareStackTest::BazMiddleware" - end - assert_equal BazMiddleware, @stack.last.klass - end - end - - test "use should push middleware as a symbol onto the stack" do - assert_deprecated do - assert_difference "@stack.size" do - @stack.use :"MiddlewareStackTest::BazMiddleware" - end - assert_equal BazMiddleware, @stack.last.klass - end - end - test "use should push middleware class with arguments onto the stack" do assert_difference "@stack.size" do @stack.use BazMiddleware, true, foo: "bar" @@ -107,10 +83,8 @@ class MiddlewareStackTest < ActiveSupport::TestCase end test "unshift adds a new middleware at the beginning of the stack" do - assert_deprecated do - @stack.unshift :"MiddlewareStackTest::BazMiddleware" - assert_equal BazMiddleware, @stack.first.klass - end + @stack.unshift MiddlewareStackTest::BazMiddleware + assert_equal BazMiddleware, @stack.first.klass end test "raise an error on invalid index" do @@ -123,15 +97,6 @@ class MiddlewareStackTest < ActiveSupport::TestCase end end - test "lazy evaluates middleware class" do - assert_deprecated do - assert_difference "@stack.size" do - @stack.use "MiddlewareStackTest::BazMiddleware" - end - assert_equal BazMiddleware, @stack.last.klass - end - end - test "can check if Middleware are equal - Class" do assert_equal @stack.last, BarMiddleware end |