alphagov/whitehall — pull request #881 by heathd (2013-09-23 16:45:59+00:00)
Title: Use transactional fixtures even when db queries disabled

The disable_database_queries method should prevent db operations.
However it does not block INSERT queries, so data can be inadvertently
changed by associations on FactoryGirl factories.

This was causing test interference and intermittent failures because
User objects were getting created in some tests and persisting across
test runs.

I've logged a tech-debt story[1] to review the use of
disable_database_queries and possibly remove it as I think that the cost
of the added complication in tests is excessive compared to the
benefits of any test speedup.

[1] https://www.pivotaltracker.com/story/show/57500426