blob: c36227f24af09a8b4600f240db67f4fcfcb3b4e8 [file] [log] [blame]
Jon Perritte747a0f2014-09-29 19:54:55 -05001package snapshots
Jon Perritt82522ca2014-09-29 22:31:31 -05002
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 TestSnapshotsURL(t *testing.T) {
17 actual := snapshotsURL(endpointClient())
18 expected := endpoint + "snapshots"
19 th.AssertEquals(t, expected, actual)
20}
21
22func TestSnapshotURL(t *testing.T) {
23 actual := snapshotURL(endpointClient(), "foo")
24 expected := endpoint + "snapshots/foo"
25 th.AssertEquals(t, expected, actual)
26}