aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport/server/loader_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/transport/server/loader_test.go')
-rw-r--r--plumbing/transport/server/loader_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/plumbing/transport/server/loader_test.go b/plumbing/transport/server/loader_test.go
index 5f32cb0..38fabe3 100644
--- a/plumbing/transport/server/loader_test.go
+++ b/plumbing/transport/server/loader_test.go
@@ -5,6 +5,7 @@ import (
"path/filepath"
"gopkg.in/src-d/go-git.v4/plumbing/transport"
+ "gopkg.in/src-d/go-git.v4/storage/memory"
. "gopkg.in/check.v1"
)
@@ -54,3 +55,18 @@ func (s *LoaderSuite) TestLoadIgnoreHost(c *C) {
c.Assert(err, IsNil)
c.Assert(sto, NotNil)
}
+
+func (s *LoaderSuite) TestMapLoader(c *C) {
+ ep, err := transport.NewEndpoint("file://test")
+ sto := memory.NewStorage()
+ c.Assert(err, IsNil)
+
+ loader := MapLoader{ep.String(): sto}
+
+ ep, err = transport.NewEndpoint("file://test")
+ c.Assert(err, IsNil)
+
+ loaderSto, err := loader.Load(ep)
+ c.Assert(err, IsNil)
+ c.Assert(sto, Equals, loaderSto)
+}