Files
mostlymatter/model/webrtc_test.go
2017-04-16 21:14:31 -04:00

20 строки
396 B
Go

// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package model
import (
"strings"
"testing"
)
func TestWebrtcJson(t *testing.T) {
o := WebrtcInfoResponse{Token: NewId(), GatewayUrl: NewId()}
json := o.ToJson()
ro := WebrtcInfoResponseFromJson(strings.NewReader(json))
if o.Token != ro.Token {
t.Fatal("Tokens do not match")
}
}