[tests-only] [full-ci] Refactoring unshare step definition code (#6608)
* added unshare scenerio * remove unshare keyword from step definition * refactoring of step definition codes * refactor
This commit is contained in:
@@ -3529,6 +3529,25 @@ trait Sharing {
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function userHasUnsharedResourceSharedTo(string $sharer, string $path, string $sharee): void {
|
||||
$this->userUnsharesResourceSharedTo($sharer, $path, $sharee);
|
||||
$this->ocsContext->assertOCSResponseIndicatesSuccess(
|
||||
'The ocs share response does not indicate success.',
|
||||
);
|
||||
$this->emptyLastHTTPStatusCodesArray();
|
||||
$this->emptyLastOCSStatusCodesArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" unshares (?:folder|file|entity) "([^"]*)" shared to "([^"]*)"$/
|
||||
*
|
||||
* @param string $sharer
|
||||
* @param string $path
|
||||
* @param string $sharee
|
||||
*
|
||||
* @return void
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function userUnsharesResourceSharedTo(string $sharer, string $path, string $sharee): void {
|
||||
$sharer = $this->getActualUsername($sharer);
|
||||
$sharee = $this->getActualUsername($sharee);
|
||||
|
||||
@@ -3550,12 +3569,6 @@ trait Sharing {
|
||||
'DELETE',
|
||||
'/apps/files_sharing/api/v' . $this->sharingApiVersion . '/shares/' . $shareId
|
||||
);
|
||||
|
||||
$this->ocsContext->assertOCSResponseIndicatesSuccess(
|
||||
'The ocs share response does not indicate success.',
|
||||
);
|
||||
$this->emptyLastHTTPStatusCodesArray();
|
||||
$this->emptyLastOCSStatusCodesArray();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user