added response check after file download (#6643)

This commit is contained in:
Prajwol Amatya
2023-06-28 10:12:04 +05:45
committed by GitHub
parent d1d36e6f5a
commit 73d48b1132
@@ -1184,7 +1184,13 @@ trait WebDav {
public function contentOfFileForUserShouldBe(string $fileName, string $user, string $content):void {
$user = $this->getActualUsername($user);
$this->downloadFileAsUserUsingPassword($user, $fileName);
$this->downloadedContentShouldBe($content);
$actualStatus = $this->response->getStatusCode();
if ($actualStatus !== 200) {
throw new Exception(
"Expected status code to be '200', but got '$actualStatus'"
);
}
$this->checkDownloadedContentMatches($content);
}
/**