mirror of
https://lab.forgefriends.org/friendlyforgeformat/gof3.git
synced 2025-10-06 10:32:39 +02:00
28 lines
557 B
Go
28 lines
557 B
Go
![]() |
// 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()))
|
||
|
}
|
||
|
}
|