Skip to content

Commit

Permalink
Added unit test for IsAdmin().
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchell-as committed Nov 8, 2022
1 parent 194e1a2 commit 5ae4ff7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/osutils/osutils_test.go
Expand Up @@ -140,3 +140,9 @@ func TestInheritEnv_MultipleEquals(t *testing.T) {

assert.Equal(t, value, updated[key])
}

func TestIsAdmin(t *testing.T) {
isAdmin, err := IsAdmin()
assert.NoError(t, err)
assert.Equal(t, isAdmin, runtime.GOOS == "windows", "IsAdmin() should return true on Windows, false otherwise")
}

0 comments on commit 5ae4ff7

Please sign in to comment.