repo stats: add another test and fix test helper
Created by: mrnugget
@eseliger and I wrote this test while debugging some behaviour of the repo statistics table in production.
We also realized that a refactoring of the test helper made it useless, so this fixes that too.
Test plan
- These tests