blob: fac40334e0bf46b09954c43777f9f31a91d6547f [file] [log] [blame]
package volumes
import (
"testing"
"github.com/rackspace/gophercloud"
th "github.com/rackspace/gophercloud/testhelper"
)
const endpoint = "http://localhost:57909"
func endpointClient() *gophercloud.ServiceClient {
return &gophercloud.ServiceClient{Endpoint: endpoint}
}
func TestVolumesURL(t *testing.T) {
actual := volumesURL(endpointClient())
expected := endpoint + "volumes"
th.AssertEquals(t, expected, actual)
}
func TestVolumeURL(t *testing.T) {
actual := volumeURL(endpointClient(), "foo")
expected := endpoint + "volumes/foo"
th.AssertEquals(t, expected, actual)
}