blob: fe1fb4a05c890b47b3228c52aed64fa09da05275 [file] [log] [blame]
Ash Wilson0a997f82014-09-03 15:50:52 -04001package endpoints
2
3import (
4 "testing"
5
6 "github.com/rackspace/gophercloud"
7)
8
9func TestGetListURL(t *testing.T) {
10 client := gophercloud.ServiceClient{Endpoint: "http://localhost:5000/v3/"}
11 url := getListURL(&client)
12 if url != "http://localhost:5000/v3/endpoints" {
13 t.Errorf("Unexpected list URL generated: [%s]", url)
14 }
15}
16
17func TestGetEndpointURL(t *testing.T) {
18 client := gophercloud.ServiceClient{Endpoint: "http://localhost:5000/v3/"}
19 url := getEndpointURL(&client, "1234")
20 if url != "http://localhost:5000/v3/endpoints/1234" {
21 t.Errorf("Unexpected service URL generated: [%s]", url)
22 }
23}