Se agregan BEHAT para PROJECT USERS, me agregan validaciones de mensajes en mensajes de error

This commit is contained in:
Freddy Daniel Rojas Valda
2014-01-24 14:51:05 -04:00
parent 22d8b897a3
commit c309ea3a0b
3 changed files with 52 additions and 3 deletions

View File

@@ -223,7 +223,7 @@ class ProjectUser
$oCriteria->add( \UsersPeer::USR_USERNAME, $sWS_USER );
$userIsAssigned = \GroupUserPeer::doCount( $oCriteria );
if (! ($userIsAssigned >= 1)) {
$messageCode = "The User `" . $sWS_USER . "` doesn't have the activity `" . $sTASKS . "` assigned";
throw (new \Exception( "The User `" . $sWS_USER . "` doesn't have the activity `" . $sTASKS . "` assigned"));
}
}
$oDataset = \TaskUserPeer::doSelectRS($oCriteria);
@@ -237,7 +237,7 @@ class ProjectUser
$oDataset->next();
}
} else {
$messageCode = $result->message;
throw (new \Exception( $result->message));
}
return $messageCode;
} catch (Exception $e) {

View File

@@ -75,7 +75,7 @@ class ProjectUsers extends Api
*
* @url POST /:prjUid/ws/user/can-start-task
*/
public function doGetProjectWsUserCanStartTask($prjUid, wsUserCanStartTaskStructure $request_data = null)
public function doPostProjectWsUserCanStartTask($prjUid, wsUserCanStartTaskStructure $request_data = null)
{
try {
$request_data = (array)($request_data);