blob: 37e91425b5ae68d6aa2a70ec9b826558f7eeb476 [file] [log] [blame]
Jon Perrittfd53bba2014-10-03 00:41:22 -05001package apiversions
2
3import (
4 "testing"
5
6 "github.com/rackspace/gophercloud"
7 th "github.com/rackspace/gophercloud/testhelper"
8)
9
10const endpoint = "http://localhost:57909/"
11
12func endpointClient() *gophercloud.ServiceClient {
13 return &gophercloud.ServiceClient{Endpoint: endpoint}
14}
15
16func TestGetURL(t *testing.T) {
17 actual := getURL(endpointClient(), "v1")
18 expected := endpoint + "v1/"
19 th.AssertEquals(t, expected, actual)
20}
21
22func TestListURL(t *testing.T) {
23 actual := listURL(endpointClient())
24 expected := endpoint
25 th.AssertEquals(t, expected, actual)
26}