diff options
author | Jon Moss <me@jonathanmoss.me> | 2015-12-21 18:56:54 -0500 |
---|---|---|
committer | Jon Moss <me@jonathanmoss.me> | 2015-12-21 19:55:10 -0500 |
commit | 0c5287a668025df8566f983057e228515862c84a (patch) | |
tree | 2616db5be1f058bbdc0dbc5ce9720f8141283172 /actionpack/test/dispatch | |
parent | 2de2263118d6763c11a02db05079a5b7a97a0a34 (diff) | |
download | rails-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.rb | 12 |
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 |