I'm not entirely sure about your rights on this one, although it does seem as though the garage may have tried to pull a fast one here. I would recommend that you speak to an advisor at your local CAB as soon as possible, and I also found some useful information on their website about being sold an unroadworthy car
here.
Hope this helps and that you get things sorted x