spree/spree — pull request #5805 by gmacdougall (2014-12-18 22:23:19+00:00)
Title: Only consider eligible promos for used_by?

Previously this would consider a promo used as long it was assigned to
an order, even if this promo was not eligible (as in the case of when it
was overridden by a better promo).

In order to check if a promo was eligble, it needs to change the way the
associations were joined, as it now needs to check on adjustments
instead of just if the order is associated with the promotion.

The test is changed to set up a full promotion with adjustments, and
actions.