From 26a38d0af466e3d19272046485cf8a11866f5e64 Mon Sep 17 00:00:00 2001 From: jacobkeeler Date: Wed, 3 Oct 2018 10:51:12 -0400 Subject: Fix unit tests --- src/components/application_manager/test/policy_handler_test.cc | 2 +- src/components/policy/policy_external/src/policy_helper.cc | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/application_manager/test/policy_handler_test.cc b/src/components/application_manager/test/policy_handler_test.cc index 15123385a0..a1471eff36 100644 --- a/src/components/application_manager/test/policy_handler_test.cc +++ b/src/components/application_manager/test/policy_handler_test.cc @@ -921,7 +921,7 @@ TEST_F(PolicyHandlerTest, EXPECT_CALL(*mock_policy_manager_, GetAppPermissionsChanges(_)) .WillOnce(Return(permissions)); EXPECT_CALL(*mock_policy_manager_, - RemovePendingPermissionChanges(kPolicyAppId_)).Times(0); + RemovePendingPermissionChanges(kPolicyAppId_)); // Act policy_handler_.OnPendingPermissionChange(kPolicyAppId_); } diff --git a/src/components/policy/policy_external/src/policy_helper.cc b/src/components/policy/policy_external/src/policy_helper.cc index bd83f24a92..c9df969bd1 100644 --- a/src/components/policy/policy_external/src/policy_helper.cc +++ b/src/components/policy/policy_external/src/policy_helper.cc @@ -345,6 +345,8 @@ bool CheckAppPolicy::operator()(const AppPoliciesValueType& app_policy) { SetPendingPermissions( app_policy, RESULT_REQUEST_TYPE_CHANGED, permissions_diff); AddResult(app_id, RESULT_REQUEST_TYPE_CHANGED); + result = + (RESULT_NO_CHANGES == result) ? RESULT_REQUEST_TYPE_CHANGED : result; } if (is_request_subtype_changed) { LOG4CXX_TRACE( @@ -352,6 +354,8 @@ bool CheckAppPolicy::operator()(const AppPoliciesValueType& app_policy) { SetPendingPermissions( app_policy, RESULT_REQUEST_SUBTYPE_CHANGED, permissions_diff); AddResult(app_id, RESULT_REQUEST_SUBTYPE_CHANGED); + result = (RESULT_NO_CHANGES == result) ? RESULT_REQUEST_SUBTYPE_CHANGED + : result; } } -- cgit v1.2.1