Add travis hook and correct tests.