Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ go:
- tip
install:
- go get github.com/stretchr/testify/assert
- go get code.google.com/p/goauth2/oauth
- go get github.com/golang/oauth2
2 changes: 1 addition & 1 deletion examples/example_oauth.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"code.google.com/p/goauth2/oauth"
"github.com/golang/oauth2"
"github.com/bndr/gopencils"
"net/http"
)
Expand Down
11 changes: 11 additions & 0 deletions resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,17 @@ func TestDoNotDecodeBodyOnErr(t *testing.T) {
}
}

func TestNewResourceUrl(t *testing.T) {

api := Api("https://test-url.com")

res := api.Res("old")

newRes := res.Res("new")

assert.Equal(t, "new", newRes.Url, "new Resource should not be appended to old Url")
}

func readJson(path string) string {
buf, err := ioutil.ReadFile(path)
if err != nil {
Expand Down