Personally I'd never buy a 2nd hand bike from a dealer, I don't see any worthwhile reason to pay the premium over a (well researched) private sale (but I don't value my time at anything).

If they knew you were coming leaving it in the line, a flat battery and not quickly swotting up on its history seems inexcusable.