blob: 94c36cce9146b1e5c5448351e7bb85679c216afa [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")
Ash Wilsona4931872014-10-03 15:55:35 -040018 expected := endpoint + "extensions/agent"
Ash Wilson61dcb022014-10-03 08:15:47 -040019 th.AssertEquals(t, expected, actual)
20}
21
22func TestListExtensionURL(t *testing.T) {
23 actual := listExtensionURL(endpointClient())
Ash Wilsona4931872014-10-03 15:55:35 -040024 expected := endpoint + "extensions"
Ash Wilson61dcb022014-10-03 08:15:47 -040025 th.AssertEquals(t, expected, actual)
26}