aboutsummaryrefslogtreecommitdiffstats
path: root/repository/mock_repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'repository/mock_repo.go')
-rw-r--r--repository/mock_repo.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/repository/mock_repo.go b/repository/mock_repo.go
index 74de8f57..97a4504f 100644
--- a/repository/mock_repo.go
+++ b/repository/mock_repo.go
@@ -9,6 +9,8 @@ import (
"github.com/MichaelMure/git-bug/util/lamport"
)
+var _ ClockedRepo = &mockRepoForTest{}
+
// mockRepoForTest defines an instance of Repo that can be used for testing.
type mockRepoForTest struct {
config map[string]string
@@ -227,10 +229,18 @@ func (r *mockRepoForTest) WriteClocks() error {
return nil
}
+func (r *mockRepoForTest) CreateTime() lamport.Time {
+ return r.createClock.Time()
+}
+
func (r *mockRepoForTest) CreateTimeIncrement() (lamport.Time, error) {
return r.createClock.Increment(), nil
}
+func (r *mockRepoForTest) EditTime() lamport.Time {
+ return r.editClock.Time()
+}
+
func (r *mockRepoForTest) EditTimeIncrement() (lamport.Time, error) {
return r.editClock.Increment(), nil
}