Jon Perritt | b5c7812 | 2014-10-15 20:44:39 -0500 | [diff] [blame^] | 1 | package cdncontainers |
| 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 |
| 19 | th.CheckEquals(t, expected, actual) |
| 20 | } |
| 21 | |
| 22 | func TestEnableURL(t *testing.T) { |
| 23 | actual := enableURL(endpointClient(), "foo") |
| 24 | expected := endpoint + "foo" |
| 25 | th.CheckEquals(t, expected, actual) |
| 26 | } |
| 27 | |
| 28 | func TestGetURL(t *testing.T) { |
| 29 | actual := getURL(endpointClient(), "foo") |
| 30 | expected := endpoint + "foo" |
| 31 | th.CheckEquals(t, expected, actual) |
| 32 | } |
| 33 | |
| 34 | func TestUpdateURL(t *testing.T) { |
| 35 | actual := updateURL(endpointClient(), "foo") |
| 36 | expected := endpoint + "foo" |
| 37 | th.CheckEquals(t, expected, actual) |
| 38 | } |