blob: 5007b3d7dcd7dac17d66940d199cef5685c68e11 [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 Wilson89466cc2014-08-29 11:27:39 -040014 client := gophercloud.ProviderClient{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}