Files
gof3/tree/f3/path_test.go

28 lines
557 B
Go
Raw Normal View History

// Copyright Earl Warren <contact@earl-warren.org>
// Copyright Loïc Dachary <loic@dachary.org>
// SPDX-License-Identifier: MIT
package f3
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestF3Path(t *testing.T) {
{
user := "user1"
p := NewUserPath(user)
assert.Equal(t, 4, p.Length())
assert.Equal(t, user, string(p.Root().Forge().Users().First().GetID()))
}
{
topic := "topic1"
p := NewTopicPath(topic)
assert.Equal(t, 4, p.Length())
assert.Equal(t, topic, string(p.Root().Forge().Topics().First().GetID()))
}
}