mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-05 08:32:53 +01:00
REST API: update the URLs in RestAPIUserTest.php.
This commit is contained in:
@@ -147,7 +147,7 @@ class RestAPIUserTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
global $conf,$user,$langs,$db;
|
||||
|
||||
$url = $this->api_url.'/user/123456789?api_key='.$this->api_key;
|
||||
$url = $this->api_url.'/users/123456789?api_key='.$this->api_key;
|
||||
//$addheaders=array('Content-Type: application/json');
|
||||
|
||||
print __METHOD__." Request url=".$url."\n";
|
||||
@@ -159,7 +159,7 @@ class RestAPIUserTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertNotNull($object, "Parsing of json result must no be null");
|
||||
$this->assertEquals(404, $object['error']['code']);
|
||||
|
||||
$url = $this->api_url.'/user/1?api_key='.$this->api_key;
|
||||
$url = $this->api_url.'/users/1?api_key='.$this->api_key;
|
||||
|
||||
print __METHOD__." Request url=".$url."\n";
|
||||
$result=getURLContent($url, 'GET', '', 1, array());
|
||||
@@ -174,7 +174,7 @@ class RestAPIUserTest extends PHPUnit_Framework_TestCase
|
||||
public function testRestCreateUser() {
|
||||
|
||||
// attemp to create without mandatory fields :
|
||||
$url = $this->api_url.'/user?api_key='.$this->api_key;
|
||||
$url = $this->api_url.'/users?api_key='.$this->api_key;
|
||||
$addheaders=array('Content-Type: application/json');
|
||||
|
||||
$bodyobj = array(
|
||||
|
||||
Reference in New Issue
Block a user