aboutsummaryrefslogtreecommitdiff
path: root/pkg/client/state_test.go
blob: 917c2113e6919f3acb2622f914b2a2d9d8ef8f31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package client

import "testing"

func TestNewState(t *testing.T) {
	// Empty login
	if s := NewState(nil, ""); s.currentMenu != "anonymous" {
		t.Fatal("a new state without login should init to anonymous")
	}
	// logged_in
	if s := NewState(nil, "test"); s.currentMenu != "logged_in" {
		t.Fatal("a new state with login should init to logged_in")
	}
}