Ash Wilson | 0482daf | 2014-10-22 11:24:40 -0400 | [diff] [blame] | 1 | package keypairs |
| 2 | |
| 3 | import ( |
| 4 | "testing" |
| 5 | |
| 6 | th "github.com/rackspace/gophercloud/testhelper" |
| 7 | "github.com/rackspace/gophercloud/testhelper/client" |
| 8 | ) |
| 9 | |
| 10 | func TestListURL(t *testing.T) { |
| 11 | th.SetupHTTP() |
| 12 | defer th.TeardownHTTP() |
| 13 | c := client.ServiceClient() |
| 14 | |
| 15 | th.CheckEquals(t, c.Endpoint+"os-keypairs", listURL(c)) |
| 16 | } |
| 17 | |
| 18 | func TestCreateURL(t *testing.T) { |
| 19 | th.SetupHTTP() |
| 20 | defer th.TeardownHTTP() |
| 21 | c := client.ServiceClient() |
| 22 | |
| 23 | th.CheckEquals(t, c.Endpoint+"os-keypairs", createURL(c)) |
| 24 | } |
| 25 | |
| 26 | func TestGetURL(t *testing.T) { |
| 27 | th.SetupHTTP() |
| 28 | defer th.TeardownHTTP() |
| 29 | c := client.ServiceClient() |
| 30 | |
| 31 | th.CheckEquals(t, c.Endpoint+"os-keypairs/wat", getURL(c, "wat")) |
| 32 | } |
| 33 | |
| 34 | func TestDeleteURL(t *testing.T) { |
| 35 | th.SetupHTTP() |
| 36 | defer th.TeardownHTTP() |
| 37 | c := client.ServiceClient() |
| 38 | |
| 39 | th.CheckEquals(t, c.Endpoint+"os-keypairs/wat", deleteURL(c, "wat")) |
| 40 | } |