Git: mock time functions in tests.

This commit is contained in:
Abiola Ibrahim
2015-05-28 08:21:10 +01:00
parent 879558b9ee
commit 2013838bfd
7 changed files with 87 additions and 16 deletions

View File

@ -68,7 +68,7 @@ func (r *Repo) Pull() error {
defer r.Unlock()
// prevent a pull if the last one was less than 5 seconds ago
if time.Since(r.lastPull) < 5*time.Second {
if gos.TimeSince(r.lastPull) < 5*time.Second {
return nil
}