aboutsummaryrefslogtreecommitdiffstats
path: root/remote_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'remote_test.go')
-rw-r--r--remote_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/remote_test.go b/remote_test.go
index 82ec1fc..dd386b0 100644
--- a/remote_test.go
+++ b/remote_test.go
@@ -100,6 +100,20 @@ func (s *RemoteSuite) TestFetch(c *C) {
})
}
+func (s *RemoteSuite) TestFetchNonExistantReference(c *C) {
+ r := newRemote(memory.NewStorage(), &config.RemoteConfig{
+ URLs: []string{s.GetLocalRepositoryURL(fixtures.ByTag("tags").One())},
+ })
+
+ err := r.Fetch(&FetchOptions{
+ RefSpecs: []config.RefSpec{
+ config.RefSpec("+refs/heads/foo:refs/remotes/origin/foo"),
+ },
+ })
+
+ c.Assert(err, ErrorMatches, "couldn't find remote ref.*")
+}
+
func (s *RemoteSuite) TestFetchContext(c *C) {
r := newRemote(memory.NewStorage(), &config.RemoteConfig{
URLs: []string{s.GetLocalRepositoryURL(fixtures.ByTag("tags").One())},