提交 e45f388e 编写于 作者: K Kasper Timm Hansen

Fix assertion count after 69e1bb52.

When changing the generated integration tests to assert redirects with
an absolute path this redirection check in `assert_redirected_to` against
the absolute response location would now pass:
https://github.com/rails/rails/blob/af245aaf3a1c447752a1b5895adddc66e5f73c00/actionpack/lib/action_dispatch/testing/assertions/response.rb#L55

Thus we'd break early instead of hitting `assert_operator` and have
2 fewer assertions per `assert_redirected_to` as `assert_operator`
is composed of 2 assertions internally:
https://github.com/seattlerb/minitest/blob/4e146b1515b19a5c474e39c174b037510f6dbc6e/lib/minitest/assertions.rb#L254-L258

Deduct 2 assertions for 2 redirects taking the expected count down by 4
in total for the two failing tests.
上级 af245aaf
......@@ -287,7 +287,7 @@ def test_scaffold_tests_pass_by_default
RAILS_ENV=test bin/rails db:migrate test`
end
assert_match(/7 runs, 12 assertions, 0 failures, 0 errors/, output)
assert_match(/7 runs, 9 assertions, 0 failures, 0 errors/, output)
assert_no_match(/Errors running/, output)
end
......@@ -318,7 +318,7 @@ def test_scaffold_with_references_columns_tests_pass_by_default
RAILS_ENV=test bin/rails db:migrate test`
end
assert_match(/7 runs, 12 assertions, 0 failures, 0 errors/, output)
assert_match(/7 runs, 9 assertions, 0 failures, 0 errors/, output)
assert_no_match(/Errors running/, output)
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册