blob: da37bf631a5fc8d61f0a79bf99160deb864678aa [file] [log] [blame]
package containers
import (
"testing"
"github.com/rackspace/gophercloud"
)
func TestAccountURL(t *testing.T) {
client := gophercloud.ServiceClient{
Endpoint: "http://localhost:5000/v1/",
}
expected := "http://localhost:5000/v1/"
actual := accountURL(&client)
if actual != expected {
t.Errorf("Unexpected service URL generated: [%s]", actual)
}
}
func TestContainerURL(t *testing.T) {
client := gophercloud.ServiceClient{
Endpoint: "http://localhost:5000/v1/",
}
expected := "http://localhost:5000/v1/testContainer"
actual := containerURL(&client, "testContainer")
if actual != expected {
t.Errorf("Unexpected service URL generated: [%s]", actual)
}
}