blob: da37bf631a5fc8d61f0a79bf99160deb864678aa [file] [log] [blame]
Jon Perritt50da9b42014-09-14 15:06:59 -05001package containers
2
3import (
4 "testing"
5 "github.com/rackspace/gophercloud"
6)
7
8func TestAccountURL(t *testing.T) {
9 client := gophercloud.ServiceClient{
10 Endpoint: "http://localhost:5000/v1/",
11 }
12 expected := "http://localhost:5000/v1/"
13 actual := accountURL(&client)
14 if actual != expected {
15 t.Errorf("Unexpected service URL generated: [%s]", actual)
16 }
17
18}
19
20func TestContainerURL(t *testing.T) {
21 client := gophercloud.ServiceClient{
22 Endpoint: "http://localhost:5000/v1/",
23 }
24 expected := "http://localhost:5000/v1/testContainer"
25 actual := containerURL(&client, "testContainer")
26 if actual != expected {
27 t.Errorf("Unexpected service URL generated: [%s]", actual)
28 }
29}