mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Currectly test the Middleware#==
This commit is contained in:
parent
d9f4a2839f
commit
d182c22e91
1 changed files with 8 additions and 4 deletions
|
@ -133,14 +133,18 @@ class MiddlewareStackTest < ActiveSupport::TestCase
|
|||
end
|
||||
|
||||
test "can check if Middleware are equal - Class" do
|
||||
assert_equal BazMiddleware, BazMiddleware
|
||||
assert_equal @stack.last, BarMiddleware
|
||||
end
|
||||
|
||||
test "includes a class" do
|
||||
assert_equal true, @stack.include?(BarMiddleware)
|
||||
end
|
||||
|
||||
test "can check if Middleware are equal - Middleware" do
|
||||
assert_equal @stack.middlewares.first, @stack.middlewares.first
|
||||
assert_equal @stack.last, @stack.last
|
||||
end
|
||||
|
||||
test "klass is correct" do
|
||||
assert_equal @stack.middlewares.first.klass, FooMiddleware
|
||||
test "includes a middleware" do
|
||||
assert_equal true, @stack.include?(ActionDispatch::MiddlewareStack::Middleware.new(BarMiddleware, nil, nil))
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue