summaryrefslogtreecommitdiffstats
path: root/model/webrtc_test.go
blob: 2418bd53a9cf89dc187c93c41c452bfbc74a3a60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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")
	}
}