MCPcopy Create free account
hub / github.com/go-git/go-git / TestPushInvalidRefSpec

Method TestPushInvalidRefSpec

remote_test.go:1193–1204  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

1191}
1192
1193func (s *RemoteSuite) TestPushInvalidRefSpec(c *C) {
1194 r := NewRemote(nil, &config.RemoteConfig{
1195 Name: DefaultRemoteName,
1196 URLs: []string{"some-url"},
1197 })
1198
1199 rs := config.RefSpec("^*$**")
1200 err := r.Push(&PushOptions{
1201 RefSpecs: []config.RefSpec{rs},
1202 })
1203 c.Assert(err, Equals, config.ErrRefSpecMalformedSeparator)
1204}
1205
1206func (s *RemoteSuite) TestPushWrongRemoteName(c *C) {
1207 r := NewRemote(nil, &config.RemoteConfig{

Callers

nothing calls this directly

Calls 3

PushMethod · 0.95
RefSpecTypeAlias · 0.92
NewRemoteFunction · 0.85

Tested by

no test coverage detected