blob: 2a1e6a1a53b7c0b9fdf2eab7064947bf9dd96803 [file] [log] [blame]
Ash Wilson61dcb022014-10-03 08:15:47 -04001package extensions
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 TestExtensionURL(t *testing.T) {
17 actual := extensionURL(endpointClient(), "agent")
18 expected := endpoint + "v2.0/extensions/agent"
19 th.AssertEquals(t, expected, actual)
20}
21
22func TestListExtensionURL(t *testing.T) {
23 actual := listExtensionURL(endpointClient())
24 expected := endpoint + "v2.0/extensions"
25 th.AssertEquals(t, expected, actual)
26}