Tests: Add unit test
This commit is contained in:
parent
f9ea868582
commit
b32e3cd244
1 changed files with 16 additions and 0 deletions
16
internal/entity/auth_session_report_test.go
Normal file
16
internal/entity/auth_session_report_test.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
package entity
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestSession_Report(t *testing.T) {
|
||||
m := FindSessionByRefID("sessxkkcabcd")
|
||||
|
||||
r, _ := m.Report(false)
|
||||
assert.GreaterOrEqual(t, len(r), 1)
|
||||
|
||||
r2, _ := m.Report(true)
|
||||
assert.GreaterOrEqual(t, len(r2), 1)
|
||||
}
|
Loading…
Reference in a new issue