blob: 8acd01bda9191d0c589da482cdd0815cbf9f8657 [file] [log] [blame]
Jon Perrittb5c78122014-10-15 20:44:39 -05001package cdncontainers
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 TestListURL(t *testing.T) {
17 actual := listURL(endpointClient())
18 expected := endpoint
19 th.CheckEquals(t, expected, actual)
20}
21
22func TestEnableURL(t *testing.T) {
23 actual := enableURL(endpointClient(), "foo")
24 expected := endpoint + "foo"
25 th.CheckEquals(t, expected, actual)
26}
27
28func TestGetURL(t *testing.T) {
29 actual := getURL(endpointClient(), "foo")
30 expected := endpoint + "foo"
31 th.CheckEquals(t, expected, actual)
32}
33
34func TestUpdateURL(t *testing.T) {
35 actual := updateURL(endpointClient(), "foo")
36 expected := endpoint + "foo"
37 th.CheckEquals(t, expected, actual)
38}