init
This commit is contained in:
23
app_options_test.go
Normal file
23
app_options_test.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package main
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestNewAppOptionsHidesWindowOnClose(t *testing.T) {
|
||||
app := &App{}
|
||||
|
||||
options := newAppOptions(app, assets)
|
||||
|
||||
if !options.HideWindowOnClose {
|
||||
t.Fatal("expected closing the window to hide it instead of quitting")
|
||||
}
|
||||
}
|
||||
|
||||
func TestNewAppOptionsStopsTrayOnShutdown(t *testing.T) {
|
||||
app := &App{}
|
||||
|
||||
options := newAppOptions(app, assets)
|
||||
|
||||
if options.OnShutdown == nil {
|
||||
t.Fatal("expected shutdown hook to clean up the tray icon")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user