Ash Wilson | b73b7f8 | 2014-08-29 15:38:06 -0400 | [diff] [blame] | 1 | package services |
| 2 | |
| 3 | import ( |
| 4 | "testing" |
| 5 | |
| 6 | "github.com/rackspace/gophercloud" |
| 7 | ) |
| 8 | |
| 9 | func TestGetListURL(t *testing.T) { |
| 10 | client := gophercloud.ServiceClient{Endpoint: "http://localhost:5000/v3/"} |
| 11 | url := getListURL(&client) |
| 12 | if url != "http://localhost:5000/v3/services" { |
| 13 | t.Errorf("Unexpected list URL generated: [%s]", url) |
| 14 | } |
| 15 | } |
Ash Wilson | 6e87003 | 2014-09-02 08:38:27 -0400 | [diff] [blame] | 16 | |
| 17 | func TestGetServiceURL(t *testing.T) { |
| 18 | client := gophercloud.ServiceClient{Endpoint: "http://localhost:5000/v3/"} |
| 19 | url := getServiceURL(&client, "1234") |
| 20 | if url != "http://localhost:5000/v3/services/1234" { |
| 21 | t.Errorf("Unexpected service URL generated: [%s]", url) |
| 22 | } |
| 23 | } |