diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-06-19 15:03:30 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2017-06-19 15:03:30 +0200 |
commit | 85a91266571a966f10e73bdd641d753eb0431a7a (patch) | |
tree | d80a42f96da39966a84ad899c842f5173b7a2659 /worktree_test.go | |
parent | ad7432333d5859352ca67864815c4e5037fcd4eb (diff) | |
download | go-git-85a91266571a966f10e73bdd641d753eb0431a7a.tar.gz |
worktree: Add create and push the blob objects to the storer
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
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) { |