rails / jbuilder

Jbuilder: generate JSON objects with a Builder-style DSL
MIT License
4.34k stars 440 forks source link

Fix the test that depends on the time helper #513

Closed yuki24 closed 3 years ago

yuki24 commented 3 years ago

This PR fixes the failing test in the master branch. The test is failing on this line on Rails. Apparently, the time helper is now timezone-aware after this change https://github.com/rails/rails/commit/b96f4ae1d5defd84e690d265467738901291347d, but now we have to set the default time zone to make the time helper work with string arguments.

Rather than setting a default time zone in the jbuilder test, we can just pass a Time object to get the test working.