diff --git a/connection_test.go b/connection_test.go index e952290be..f42ec4189 100644 --- a/connection_test.go +++ b/connection_test.go @@ -31,3 +31,11 @@ func TestConnectionInvalid(t *testing.T) { t.Error(err) } } + +func TestConnectionURI(t *testing.T) { + conn := Connection{"sess-id", "sess-token", "sas", "sb://endpoint/.net/liveshare"} + uri := conn.uri("connect") + if uri != "wss://endpoint/.net:443/$hc/liveshare?sb-hc-action=connect&sb-hc-token=sas" { + t.Errorf("uri is not correct, got: '%v'", uri) + } +}