2019-09-13 20:49:16 +08:00
|
|
|
// 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) {
|
2020-03-19 22:56:12 +08:00
|
|
|
gtest.C(t, func(t *gtest.T) {
|
2019-09-13 20:49:16 +08:00
|
|
|
id1 := NewSessionId()
|
|
|
|
id2 := NewSessionId()
|
2020-03-19 22:56:12 +08:00
|
|
|
t.AssertNE(id1, id2)
|
2020-05-28 20:28:07 +08:00
|
|
|
t.Assert(len(id1), 32)
|
2019-09-13 20:49:16 +08:00
|
|
|
})
|
|
|
|
}
|