[openstreetmap/openstreetmap-website] Replace trace-related fixtures with factories. (#1347)

Andy Allan notifications at github.com
Wed Nov 16 20:16:11 UTC 2016


I've fixed the bug by using letters instead of numbers for the gpx fixtures. This way they won't be accidentally deleted during the test runs.

I spotted an error in the refactoring of the trace_controller test, since the check_trace_list method didn't have an expected number of results. This meant that it failed to assert on empty lists.

The timestamp thing in that commit I spent ages faffing around with. If I remove the 4.seconds.ago stuff, then the test fails for me consistently and I'm not 100% sure what's going on. But making the timestamps explicitly different means the `order("timestamp DESC")` becomes reliable.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1347#issuecomment-261059002
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20161116/8eeb8cfa/attachment.html>


More information about the rails-dev mailing list