Jamie Hannaford | 89f9af2 | 2014-09-17 12:21:48 +0200 | [diff] [blame] | 1 | package subnets |
Jamie Hannaford | 0708c00 | 2014-09-17 16:08:49 +0200 | [diff] [blame^] | 2 | |
| 3 | import ( |
| 4 | "testing" |
| 5 | |
| 6 | "github.com/rackspace/gophercloud" |
| 7 | th "github.com/rackspace/gophercloud/testhelper" |
| 8 | ) |
| 9 | |
| 10 | const Endpoint = "http://localhost:57909/" |
| 11 | |
| 12 | func EndpointClient() *gophercloud.ServiceClient { |
| 13 | return &gophercloud.ServiceClient{Endpoint: Endpoint} |
| 14 | } |
| 15 | |
| 16 | func TestListURL(t *testing.T) { |
| 17 | actual := ListURL(EndpointClient()) |
| 18 | expected := Endpoint + "v2.0/subnets" |
| 19 | th.AssertEquals(t, expected, actual) |
| 20 | } |
| 21 | |
| 22 | func TestGetURL(t *testing.T) { |
| 23 | actual := GetURL(EndpointClient(), "foo") |
| 24 | expected := Endpoint + "v2.0/subnets/foo" |
| 25 | th.AssertEquals(t, expected, actual) |
| 26 | } |