mirror of
https://github.com/fleetdm/fleet
synced 2026-05-17 22:18:39 +00:00
23 lines
422 B
Go
23 lines
422 B
Go
package fleet
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestOperatingSystemIsWindows(t *testing.T) {
|
|
testCases := []struct {
|
|
platform string
|
|
isWindows bool
|
|
}{
|
|
{platform: "chrome"},
|
|
{platform: "darwin"},
|
|
{platform: "windows", isWindows: true},
|
|
}
|
|
|
|
for _, tc := range testCases {
|
|
sut := OperatingSystem{Platform: tc.platform}
|
|
require.Equal(t, tc.isWindows, sut.IsWindows())
|
|
}
|
|
}
|