add tests for start-http-auth msaddr

This commit is contained in:
Andre Staltz 2021-03-29 12:56:30 +03:00
parent c6397c50d3
commit 52e8ad078d
No known key found for this signature in database
GPG Key ID: 9EDE23EA7E8A4890
1 changed files with 2 additions and 0 deletions

View File

@ -431,6 +431,8 @@ func TestAuthWithSSBServerInitHappyPath(t *testing.T) {
a.Equal("start-http-auth", qry.Get("action"))
a.Equal(serverChallenge, qry.Get("sc"))
a.Equal(ts.NetworkInfo.RoomID.Ref(), qry.Get("sid"))
var msaddr = fmt.Sprintf("net:%s:%d~shs:%s", ts.NetworkInfo.Domain, ts.NetworkInfo.PortMUXRPC, base64.StdEncoding.EncodeToString(ts.NetworkInfo.RoomID.PubKey()))
a.Equal(msaddr, qry.Get("multiserverAddress"))
qrCode, has := html.Find("#start-auth-qrcode").Attr("src")
a.True(has, "should have the inline image data")