blob: 383ba59d74a974b63e0fae8ac3234922902736b1 [file] [log] [blame]
Jamie Hannaford4721abc2014-09-16 16:29:04 +02001package apiversions
Jamie Hannaford1ce30f22014-09-16 11:23:34 +02002
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 TestAPIVersionsURL(t *testing.T) {
17 actual := APIVersionsURL(EndpointClient())
18 expected := Endpoint
19 th.AssertEquals(t, expected, actual)
20}
21
22func TestAPIInfoURL(t *testing.T) {
23 actual := APIInfoURL(EndpointClient(), "v2.0")
24 expected := Endpoint + "v2.0/"
25 th.AssertEquals(t, expected, actual)
26}