Fix date sensitive issue in tests.

They were failing when the day is a single digit due to a capybara
issue (as described in a comment)