blob: 2f7b1005517c596833ef9481691c350f9dcfadfd [file] [log] [blame]
Jon Perrittef168e62014-10-08 11:14:05 -05001package images
2
3import (
4 "testing"
5
Jon Perritt27249f42016-02-18 10:35:59 -06006 "github.com/gophercloud/gophercloud"
7 th "github.com/gophercloud/gophercloud/testhelper"
Jon Perrittef168e62014-10-08 11:14:05 -05008)
9
10const endpoint = "http://localhost:57909/"
11
12func endpointClient() *gophercloud.ServiceClient {
13 return &gophercloud.ServiceClient{Endpoint: endpoint}
14}
15
16func TestGetURL(t *testing.T) {
17 actual := getURL(endpointClient(), "foo")
18 expected := endpoint + "images/foo"
19 th.CheckEquals(t, expected, actual)
20}
21
22func TestListDetailURL(t *testing.T) {
23 actual := listDetailURL(endpointClient())
24 expected := endpoint + "images/detail"
25 th.CheckEquals(t, expected, actual)
26}