jx/internal/fan/user_test.go

24 lines
438 B
Go
Raw Normal View History

2024-07-17 08:34:57 +00:00
// Copyright 2024 Matthew Rich <matthewrich.conf@gmail.com>. All rights reserved.
package fan
2024-07-17 08:34:57 +00:00
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestNewUserSource(t *testing.T) {
s := NewUser()
assert.NotNil(t, s)
}
func TestExtractUsers(t *testing.T) {
u := NewUser()
assert.NotNil(t, u)
document, err := u.Extract(nil, nil)
2024-07-17 08:34:57 +00:00
assert.Nil(t, err)
assert.NotNil(t, document)
assert.Greater(t, document.Len(), 0)
2024-07-17 08:34:57 +00:00
}