refactor repo tests