diff options
author | Julien Dessaux | 2021-01-15 16:08:31 +0100 |
---|---|---|
committer | Julien Dessaux | 2021-01-15 16:08:31 +0100 |
commit | 3d1d8ba0a772c3c038f072095d87d0b46bd1efb2 (patch) | |
tree | 4b51303ee3a4e0c094cc3b9ab3aefc1846d85559 /client/state_test.go | |
parent | Have the configuration loadFile function return a pointer (diff) | |
download | shell-game-launcher-3d1d8ba0a772c3c038f072095d87d0b46bd1efb2.tar.gz shell-game-launcher-3d1d8ba0a772c3c038f072095d87d0b46bd1efb2.tar.bz2 shell-game-launcher-3d1d8ba0a772c3c038f072095d87d0b46bd1efb2.zip |
Added generation of the menu display
Diffstat (limited to '')
-rw-r--r-- | client/state_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/client/state_test.go b/client/state_test.go new file mode 100644 index 0000000..917c211 --- /dev/null +++ b/client/state_test.go @@ -0,0 +1,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") + } +} |