Adding some more unit tests for discounts

Adds cases for flat rates as well as updating an existing discount.