grim/hgkeeper

Parents e6f733f18b86
Children 37b0575030fb
Add a unit test to make sure findHgrcsForRepo is working correctly
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hg/hgrc_test.go Fri Nov 13 20:54:08 2020 -0600
@@ -0,0 +1,18 @@
+package hg
+
+import (
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+)
+
+func TestFindHgrcsForRepo(t *testing.T) {
+ actual := findHgrcsForRepo("grim/hgkeeper")
+ expected := []string{
+ "config/hgrc",
+ "config/grim/hgrc",
+ "config/grim/hgkeeper/hgrc",
+ }
+
+ assert.Equal(t, expected, actual)
+}