mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-03-11 11:47:51 -04:00
strict check for successful request
This commit is contained in:
@@ -340,19 +340,6 @@ trait Sharing {
|
||||
$this->ocsContext->theOCSStatusCodeShouldBe("100,200", "", $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^the user creates a share using the sharing API with settings$/
|
||||
*
|
||||
* @param TableNode|null $body
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function theUserCreatesAShareWithSettings(?TableNode $body):void {
|
||||
$response = $this->createShareWithSettings($this->currentUser, $body);
|
||||
$this->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" creates a public link share using the sharing API with settings$/
|
||||
*
|
||||
@@ -400,20 +387,6 @@ trait Sharing {
|
||||
$this->userCreatesAPublicLinkShareWithSettings($this->currentUser, $body);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^the user has created a share with settings$/
|
||||
*
|
||||
* @param TableNode|null $body
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function theUserHasCreatedAShareWithSettings(?TableNode $body):void {
|
||||
$response = $this->createShareWithSettings($this->currentUser, $body);
|
||||
$this->theHTTPStatusCodeShouldBe(200, "", $response);
|
||||
$this->ocsContext->theOCSStatusCodeShouldBe("100,200", "", $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^the user has created a public link share with settings$/
|
||||
*
|
||||
@@ -875,7 +848,9 @@ trait Sharing {
|
||||
);
|
||||
|
||||
// save the created share data
|
||||
if ($response->getStatusCode() === 200) {
|
||||
if (($response->getStatusCode() === 200)
|
||||
&& \in_array($this->ocsContext->getOCSResponseStatusCode($response), ['100', '200'])
|
||||
) {
|
||||
$xmlResponse = $this->getResponseXml($response);
|
||||
if (isset($xmlResponse->data)) {
|
||||
$shareData = $xmlResponse->data;
|
||||
|
||||
Reference in New Issue
Block a user