Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

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/v0"
 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}