blob: f321736fa7aac3fcd2b38a3044c156c89c239e0d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package packp
import (
"gopkg.in/src-d/go-git.v4/plumbing"
. "gopkg.in/check.v1"
)
type UploadPackRequestSuite struct{}
var _ = Suite(&UploadPackRequestSuite{})
func (s *UploadPackRequestSuite) TestUploadPackRequest_IsEmpty(c *C) {
r := NewUploadPackRequest()
r.Want(plumbing.NewHash("d82f291cde9987322c8a0c81a325e1ba6159684c"))
r.Want(plumbing.NewHash("2b41ef280fdb67a9b250678686a0c3e03b0a9989"))
r.Have(plumbing.NewHash("6ecf0ef2c2dffb796033e5a02219af86ec6584e5"))
c.Assert(r.IsEmpty(), Equals, false)
r = NewUploadPackRequest()
r.Want(plumbing.NewHash("d82f291cde9987322c8a0c81a325e1ba6159684c"))
r.Want(plumbing.NewHash("2b41ef280fdb67a9b250678686a0c3e03b0a9989"))
r.Have(plumbing.NewHash("d82f291cde9987322c8a0c81a325e1ba6159684c"))
c.Assert(r.IsEmpty(), Equals, false)
r = NewUploadPackRequest()
r.Want(plumbing.NewHash("d82f291cde9987322c8a0c81a325e1ba6159684c"))
r.Have(plumbing.NewHash("d82f291cde9987322c8a0c81a325e1ba6159684c"))
c.Assert(r.IsEmpty(), Equals, true)
}
|