aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
diff options
context:
space:
mode:
authorJon Moss <me@jonathanmoss.me>2015-12-21 18:56:54 -0500
committerJon Moss <me@jonathanmoss.me>2015-12-21 19:55:10 -0500
commit0c5287a668025df8566f983057e228515862c84a (patch)
tree2616db5be1f058bbdc0dbc5ce9720f8141283172 /actionpack/test/dispatch
parent2de2263118d6763c11a02db05079a5b7a97a0a34 (diff)
downloadrails-0c5287a668025df8566f983057e228515862c84a.tar.gz
rails-0c5287a668025df8566f983057e228515862c84a.tar.bz2
rails-0c5287a668025df8566f983057e228515862c84a.zip
Add #== back to ActionDispatch::MiddlewareStack::Middleware
This was causing bug #22738 to occur. Also added extra tests to make sure everything is A-OK.
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r--actionpack/test/dispatch/middleware_stack_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/middleware_stack_test.rb b/actionpack/test/dispatch/middleware_stack_test.rb
index 33aa616474..b8da0024de 100644
--- a/actionpack/test/dispatch/middleware_stack_test.rb
+++ b/actionpack/test/dispatch/middleware_stack_test.rb
@@ -131,4 +131,16 @@ class MiddlewareStackTest < ActiveSupport::TestCase
assert_equal BazMiddleware, @stack.last.klass
end
end
+
+ test "can check if Middleware are equal - Class" do
+ assert_equal BazMiddleware, BazMiddleware
+ end
+
+ test "can check if Middleware are equal - Middleware" do
+ assert_equal @stack.middlewares.first, @stack.middlewares.first
+ end
+
+ test "klass is correct" do
+ assert_equal @stack.middlewares.first.klass, FooMiddleware
+ end
end