blob: 3223b1ca8b0790ace630600d0824b65a8d2d26d8 [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) {
Ash Wilson05e41072014-10-03 16:33:42 -040017 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) {
Ash Wilson05e41072014-10-03 16:33:42 -040023 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}