* Migrate tests from model/websocket_request_test.go to use testifyy

* Migrate tests from model/websocket_request_test.go to use testify

* Update model/websocket_request_test.go

Co-Authored-By: Miguel de la Cruz <mgdelacroix@gmail.com>

* Update model/websocket_request_test.go

Co-Authored-By: Miguel de la Cruz <mgdelacroix@gmail.com>
Этот коммит содержится в:
TPaschalis
2019-10-12 00:00:23 +03:00
коммит произвёл Jesús Espino
родитель 97496d4e29
Коммит 946a5c1417

Просмотреть файл

@@ -6,6 +6,8 @@ package model
import (
"strings"
"testing"
"github.com/stretchr/testify/require"
)
func TestWebSocketRequest(t *testing.T) {
@@ -13,13 +15,9 @@ func TestWebSocketRequest(t *testing.T) {
json := m.ToJson()
result := WebSocketRequestFromJson(strings.NewReader(json))
if result == nil {
t.Fatal("should not be nil")
}
require.NotNil(t, result)
badresult := WebSocketRequestFromJson(strings.NewReader("junk"))
if badresult != nil {
t.Fatal("should have been nil")
}
require.Nil(t, badresult)
}