safing-portmaster/status/status_test.go
2018-10-30 19:12:25 +01:00

36 lines
962 B
Go

package status
import "testing"
func TestStatus(t *testing.T) {
SetCurrentSecurityLevel(SecurityLevelOff)
SetSelectedSecurityLevel(SecurityLevelOff)
if FmtCurrentSecurityLevel() != "Off" {
t.Error("unexpected string representation")
}
SetCurrentSecurityLevel(SecurityLevelDynamic)
SetSelectedSecurityLevel(SecurityLevelDynamic)
if FmtCurrentSecurityLevel() != "Dynamic" {
t.Error("unexpected string representation")
}
SetCurrentSecurityLevel(SecurityLevelSecure)
SetSelectedSecurityLevel(SecurityLevelSecure)
if FmtCurrentSecurityLevel() != "Secure" {
t.Error("unexpected string representation")
}
SetCurrentSecurityLevel(SecurityLevelFortress)
SetSelectedSecurityLevel(SecurityLevelFortress)
if FmtCurrentSecurityLevel() != "Fortress" {
t.Error("unexpected string representation")
}
SetSelectedSecurityLevel(SecurityLevelDynamic)
if FmtCurrentSecurityLevel() != "Fortress*" {
t.Error("unexpected string representation")
}
}