gf/os/gsession/gsession_unit_test.go

23 lines
512 B
Go

// Copyright 2019 gf Author(https://github.com/gogf/gf). All Rights Reserved.
//
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://github.com/gogf/gf.
package gsession
import (
"testing"
"github.com/gogf/gf/test/gtest"
)
func Test_NewSessionId(t *testing.T) {
gtest.Case(t, func() {
id1 := NewSessionId()
id2 := NewSessionId()
gtest.AssertNE(id1, id2)
gtest.Assert(len(id1), 18)
})
}