summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjacobkeeler <jacob.keeler@livioradio.com>2018-10-03 10:51:12 -0400
committerjacobkeeler <jacob.keeler@livioradio.com>2018-10-03 10:53:34 -0400
commit26a38d0af466e3d19272046485cf8a11866f5e64 (patch)
tree6c6c188e3456726da10cbc7c55b8c7683da9735a
parentb3e1c2c8e55064af494170fc5f8741bcaa69d426 (diff)
downloadsdl_core-26a38d0af466e3d19272046485cf8a11866f5e64.tar.gz
Fix unit tests
-rw-r--r--src/components/application_manager/test/policy_handler_test.cc2
-rw-r--r--src/components/policy/policy_external/src/policy_helper.cc4
2 files changed, 5 insertions, 1 deletions
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;
}
}