Adds pm pull

This commit is contained in:
sm
2018-03-02 23:23:11 -08:00
parent 2a0220cddc
commit 74d360f6d7
5 changed files with 90 additions and 8 deletions
+10
View File
@@ -2,6 +2,7 @@ package pm
import (
"errors"
"net/url"
"testing"
)
@@ -92,4 +93,13 @@ func TestAvailableUpdate(t *testing.T) {
if got, want := a["a"]["v1.0.0"].Description, "test last in"; got != want {
t.Fatalf("last in didn't override")
}
u, err := url.Parse("https://pm.mcquay.me/darwin/amd64")
if err != nil {
t.Fatalf("parsing url: %v", err)
}
a.SetRemote(*u)
if got, want := a["a"]["v1.0.0"].Remote, *u; got != want {
t.Fatalf("last in didn't override")
}
}