blob: 3223b1ca8b0790ace630600d0824b65a8d2d26d8 [file] [log] [blame]
Jamie Hannaford2aaf1a62014-10-16 12:55:50 +02001package 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 + "extensions/agent"
19 th.AssertEquals(t, expected, actual)
20}
21
22func TestListExtensionURL(t *testing.T) {
23 actual := ListExtensionURL(endpointClient())
24 expected := endpoint + "extensions"
25 th.AssertEquals(t, expected, actual)
26}