[Account] Test AccountManager_getProvider_without_applicationId fixed
authorAndrzej Popowski <a.popowski@samsung.com>
Fri, 13 Feb 2015 15:26:20 +0000 (16:26 +0100)
committerPawel Andruszkiewicz <p.andruszkie@samsung.com>
Fri, 13 Feb 2015 15:29:37 +0000 (00:29 +0900)
Change-Id: Iae844d89a95797c107b6b79bb5043efaf46a07dc
Signed-off-by: Andrzej Popowski <a.popowski@samsung.com>
src/account/account_manager.cc

index b6fcc8aa7e3a03a4479e36befaaaf640fc39c801..73164b238f690eeda567c1f3330a05b04b9463fa 100644 (file)
@@ -222,7 +222,11 @@ bool AccountManager::GetProviderInfo(const std::string& provider_id,
   }
 
   ret = account_type_query_by_app_id(provider_id.c_str(), &provider);
-  if (ret != ACCOUNT_ERROR_NONE) {
+  if (ACCOUNT_ERROR_RECORD_NOT_FOUND == ret || ACCOUNT_ERROR_INVALID_PARAMETER == ret) {
+    out["status"] = picojson::value("success");
+    out["result"] = picojson::value();
+    return true;
+  } else if (ret != ACCOUNT_ERROR_NONE) {
     LoggerE("Failed to get provider info");
     REPORT_ERROR(out, UnknownException(GetErrorMsg(ret)));
     return false;