blob: 5ff8bc6ad7650294ea5fa29a17db7e30171971f2 [file] [log] [blame]
Ash Wilsonb482d542014-08-28 15:48:04 -04001package tokens
2
3import (
4 "testing"
5
6 "github.com/rackspace/gophercloud"
Ash Wilson0ab4d612014-08-29 11:10:13 -04007 "github.com/rackspace/gophercloud/testhelper"
Ash Wilsonb482d542014-08-28 15:48:04 -04008)
9
10func TestTokenURL(t *testing.T) {
Ash Wilson0ab4d612014-08-29 11:10:13 -040011 testhelper.SetupHTTP()
12 defer testhelper.TeardownHTTP()
Ash Wilsonb482d542014-08-28 15:48:04 -040013
Ash Wilson6425a412014-08-29 12:30:35 -040014 client := gophercloud.ServiceClient{Endpoint: testhelper.Endpoint()}
Ash Wilsonb482d542014-08-28 15:48:04 -040015
Ash Wilson0ab4d612014-08-29 11:10:13 -040016 expected := testhelper.Endpoint() + "auth/tokens"
Ash Wilsonb482d542014-08-28 15:48:04 -040017 actual := getTokenURL(&client)
18 if actual != expected {
19 t.Errorf("Expected URL %s, but was %s", expected, actual)
20 }
21}