blob: deded697248441ec7bf58835d66e16c24f4b830c [file] [log] [blame]
Ash Wilsonb73b7f82014-08-29 15:38:06 -04001package services
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/services" {
13 t.Errorf("Unexpected list URL generated: [%s]", url)
14 }
15}
Ash Wilson6e870032014-09-02 08:38:27 -040016
17func 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}