added functional test for offers and fixed bugs in the offers model spec