Search Apps Documentation Source Content File Folder Download Copy Actions Download

board_test.gno

0.48 Kb · 18 lines
 1package boards_test
 2
 3import (
 4	"testing"
 5
 6	"gno.land/p/nt/urequire/v0"
 7
 8	"gno.land/p/gnoland/boards"
 9)
10
11func TestNew(t *testing.T) {
12	board := boards.New(42)
13
14	urequire.Equal(t, 42, int(board.ID), "expect board ID to match")
15	urequire.True(t, board.Threads != nil, "expect board to support threads")
16	urequire.True(t, board.ThreadsSequence != nil, "expect board to initialize a thread ID generator")
17	urequire.False(t, board.CreatedAt.IsZero(), "expect board to have a creation date")
18}