Wouldn't a functional test have caught this better? Ideally a unit test would use mock objects for all external resources, so it probably wouldn't have caught this. A full end to end functional test would have.
Better if it tests the production site directly, in addition to testing in a test environment.