summaryrefslogtreecommitdiffstats
path: root/modules/collect_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/collect_test.go')
-rw-r--r--modules/collect_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/collect_test.go b/modules/collect_test.go
index d76c0b2bb..63410ddb1 100644
--- a/modules/collect_test.go
+++ b/modules/collect_test.go
@@ -36,3 +36,19 @@ func TestPathKey(t *testing.T) {
}
}
+
+func TestFilterUnwantedMounts(t *testing.T) {
+
+ mounts := []Mount{
+ Mount{Source: "a", Target: "b", Lang: "en"},
+ Mount{Source: "a", Target: "b", Lang: "en"},
+ Mount{Source: "b", Target: "c", Lang: "en"},
+ }
+
+ filtered := filterUnwantedMounts(mounts)
+
+ assert := require.New(t)
+ assert.Len(filtered, 2)
+ assert.Equal([]Mount{Mount{Source: "a", Target: "b", Lang: "en"}, Mount{Source: "b", Target: "c", Lang: "en"}}, filtered)
+
+}