blob: 95b179f049f8b9ecef58ba47426a7497d73a386e [file] [log] [blame]
Jamie Hannaford89f9af22014-09-17 12:21:48 +02001package subnets
Jamie Hannaford0708c002014-09-17 16:08:49 +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 TestListURL(t *testing.T) {
17 actual := ListURL(EndpointClient())
18 expected := Endpoint + "v2.0/subnets"
19 th.AssertEquals(t, expected, actual)
20}
21
22func TestGetURL(t *testing.T) {
23 actual := GetURL(EndpointClient(), "foo")
24 expected := Endpoint + "v2.0/subnets/foo"
25 th.AssertEquals(t, expected, actual)
26}