pagination directive with tests