diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-11-08 23:46:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-08 23:46:38 +0100 |
commit | ac095bb12c4d29722b60ba9f20590fa7cfa6bc7d (patch) | |
tree | 223f36f336ba3414b1e45cac8af6c4744a5d7ef6 /config/refspec_test.go | |
parent | e523701393598f4fa241dd407af9ff8925507a1a (diff) | |
download | go-git-ac095bb12c4d29722b60ba9f20590fa7cfa6bc7d.tar.gz |
new plumbing package (#118)
* plumbing: now core was renamed to core, and formats and clients moved inside
Diffstat (limited to 'config/refspec_test.go')
-rw-r--r-- | config/refspec_test.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/config/refspec_test.go b/config/refspec_test.go index 632f5a4..f0d1a0e 100644 --- a/config/refspec_test.go +++ b/config/refspec_test.go @@ -4,7 +4,7 @@ import ( "testing" . "gopkg.in/check.v1" - "gopkg.in/src-d/go-git.v4/core" + "gopkg.in/src-d/go-git.v4/plumbing" ) type RefSpecSuite struct{} @@ -42,20 +42,20 @@ func (s *RefSpecSuite) TestRefSpecSrc(c *C) { func (s *RefSpecSuite) TestRefSpecMatch(c *C) { spec := RefSpec("refs/heads/master:refs/remotes/origin/master") - c.Assert(spec.Match(core.ReferenceName("refs/heads/foo")), Equals, false) - c.Assert(spec.Match(core.ReferenceName("refs/heads/master")), Equals, true) + c.Assert(spec.Match(plumbing.ReferenceName("refs/heads/foo")), Equals, false) + c.Assert(spec.Match(plumbing.ReferenceName("refs/heads/master")), Equals, true) } func (s *RefSpecSuite) TestRefSpecMatchBlob(c *C) { spec := RefSpec("refs/heads/*:refs/remotes/origin/*") - c.Assert(spec.Match(core.ReferenceName("refs/tag/foo")), Equals, false) - c.Assert(spec.Match(core.ReferenceName("refs/heads/foo")), Equals, true) + c.Assert(spec.Match(plumbing.ReferenceName("refs/tag/foo")), Equals, false) + c.Assert(spec.Match(plumbing.ReferenceName("refs/heads/foo")), Equals, true) } func (s *RefSpecSuite) TestRefSpecDst(c *C) { spec := RefSpec("refs/heads/master:refs/remotes/origin/master") c.Assert( - spec.Dst(core.ReferenceName("refs/heads/master")).String(), Equals, + spec.Dst(plumbing.ReferenceName("refs/heads/master")).String(), Equals, "refs/remotes/origin/master", ) } @@ -63,7 +63,7 @@ func (s *RefSpecSuite) TestRefSpecDst(c *C) { func (s *RefSpecSuite) TestRefSpecDstBlob(c *C) { spec := RefSpec("refs/heads/*:refs/remotes/origin/*") c.Assert( - spec.Dst(core.ReferenceName("refs/heads/foo")).String(), Equals, + spec.Dst(plumbing.ReferenceName("refs/heads/foo")).String(), Equals, "refs/remotes/origin/foo", ) } @@ -73,7 +73,7 @@ func (s *RefSpecSuite) TestMatchAny(c *C) { "refs/heads/foo:refs/remotes/origin/bar", } - c.Assert(MatchAny(specs, core.ReferenceName("refs/heads/foo")), Equals, true) - c.Assert(MatchAny(specs, core.ReferenceName("refs/heads/bar")), Equals, true) - c.Assert(MatchAny(specs, core.ReferenceName("refs/heads/master")), Equals, false) + c.Assert(MatchAny(specs, plumbing.ReferenceName("refs/heads/foo")), Equals, true) + c.Assert(MatchAny(specs, plumbing.ReferenceName("refs/heads/bar")), Equals, true) + c.Assert(MatchAny(specs, plumbing.ReferenceName("refs/heads/master")), Equals, false) } |