blob: c36227f24af09a8b4600f240db67f4fcfcb3b4e8 [file] [log] [blame]
package snapshots
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 TestSnapshotsURL(t *testing.T) {
actual := snapshotsURL(endpointClient())
expected := endpoint + "snapshots"
th.AssertEquals(t, expected, actual)
}
func TestSnapshotURL(t *testing.T) {
actual := snapshotURL(endpointClient(), "foo")
expected := endpoint + "snapshots/foo"
th.AssertEquals(t, expected, actual)
}