Test for wrong ActiveRecord::Migrator.needs_migration? result.

Refers to #10789 and PR #10836

This test is failing.

Suppose we have 3 migrations (1, 2 and 3), and 1st and 3rd are up, and 2nd is down. So `ActiveRecord::Migrator.needs_migration?` will return `false`, but it should return `true` of course.