added logic for a test for gift codes which have already been redeemed