aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/middleware_stack_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/middleware_stack_test.rb')
-rw-r--r--actionpack/test/controller/middleware_stack_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/controller/middleware_stack_test.rb b/actionpack/test/controller/middleware_stack_test.rb
index 5029f5f609..2a141697da 100644
--- a/actionpack/test/controller/middleware_stack_test.rb
+++ b/actionpack/test/controller/middleware_stack_test.rb
@@ -60,6 +60,12 @@ class MiddlewareStackTest < ActiveSupport::TestCase
assert_equal BazMiddleware, @stack[2].klass
end
+ test "swaps one middleware out for another" do
+ assert_equal FooMiddleware, @stack[0].klass
+ @stack.swap(FooMiddleware, BazMiddleware)
+ assert_equal BazMiddleware, @stack[0].klass
+ end
+
test "active returns all only enabled middleware" do
assert_no_difference "@stack.active.size" do
assert_difference "@stack.size" do