diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-06-19 18:27:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-19 18:27:30 +0200 |
commit | dfd68a1f987fc529a7626cc6ea1141f371115777 (patch) | |
tree | e1af261c1601bfcaec77ea45be6f2a0943d116a6 /worktree_test.go | |
parent | fc268a1a27414d7d1259a7f366e6191bd18c016f (diff) | |
parent | 85a91266571a966f10e73bdd641d753eb0431a7a (diff) | |
download | go-git-dfd68a1f987fc529a7626cc6ea1141f371115777.tar.gz |
Merge pull request #441 from mcuadros/fix-add
worktree: Add create and push the blob objects to the storer
Diffstat (limited to 'worktree_test.go')
-rw-r--r-- | worktree_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/worktree_test.go b/worktree_test.go index 06f82ca..5d0d131 100644 --- a/worktree_test.go +++ b/worktree_test.go @@ -614,6 +614,11 @@ func (s *WorktreeSuite) TestAddUntracked(c *C) { file := status.File("foo") c.Assert(file.Staging, Equals, Added) c.Assert(file.Worktree, Equals, Unmodified) + + obj, err := w.r.Storer.EncodedObject(plumbing.BlobObject, hash) + c.Assert(err, IsNil) + c.Assert(obj, NotNil) + c.Assert(obj.Size(), Equals, int64(3)) } func (s *WorktreeSuite) TestAddModified(c *C) { @@ -690,6 +695,12 @@ func (s *WorktreeSuite) TestAddSymlink(c *C) { h, err = w.Add("bar") c.Assert(err, IsNil) c.Assert(h, Equals, plumbing.NewHash("19102815663d23f8b75a47e7a01965dcdc96468c")) + + obj, err := w.r.Storer.EncodedObject(plumbing.BlobObject, h) + c.Assert(err, IsNil) + c.Assert(obj, NotNil) + c.Assert(obj.Size(), Equals, int64(3)) + } func (s *WorktreeSuite) TestRemove(c *C) { |