1 // Copyright 2020 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/enterprise_util.h"
7 #include "testing/gtest/include/gtest/gtest.h"
11 TEST(EnterpriseUtilMacTest, IsDeviceRegisteredWithManagementOldSmokeTest) {
12 MacDeviceManagementStateOld state = IsDeviceRegisteredWithManagementOld();
14 EXPECT_NE(MacDeviceManagementStateOld::kFailureAPIUnavailable, state);
15 EXPECT_NE(MacDeviceManagementStateOld::kFailureUnableToParseResult, state);
18 TEST(EnterpriseUtilMacTest, IsDeviceRegisteredWithManagementNewSmokeTest) {
19 MacDeviceManagementStateNew state = IsDeviceRegisteredWithManagementNew();
21 if (@available(macOS 10.13.4, *)) {
22 EXPECT_NE(MacDeviceManagementStateNew::kFailureAPIUnavailable, state);
23 EXPECT_NE(MacDeviceManagementStateNew::kFailureUnableToParseResult, state);
25 EXPECT_EQ(MacDeviceManagementStateNew::kFailureAPIUnavailable, state);