| package tokens | |
| import ( | |
| "testing" | |
| "github.com/rackspace/gophercloud" | |
| "github.com/rackspace/gophercloud/testhelper" | |
| ) | |
| func TestTokenURL(t *testing.T) { | |
| testhelper.SetupHTTP() | |
| defer testhelper.TeardownHTTP() | |
| client := gophercloud.ProviderClient{Endpoint: testhelper.Endpoint()} | |
| expected := testhelper.Endpoint() + "auth/tokens" | |
| actual := getTokenURL(&client) | |
| if actual != expected { | |
| t.Errorf("Expected URL %s, but was %s", expected, actual) | |
| } | |
| } |