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") } }