summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-10-14 11:51:59 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-11-05 19:44:15 +0100
commitfdb2cd4105b4fd273c32c5c2fa6b6c93d46e7182 (patch)
treef1b6b7dccbef37c4ca3870a77dd45b380a0e4eb0
parent4eaeaf92c8785f34f8ac35715fb386e09b85c37e (diff)
test_file_upload: Ensure we compare the correct contentdev-2.x
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--application/test/tests/api_v2/test_file_upload.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/application/test/tests/api_v2/test_file_upload.php b/application/test/tests/api_v2/test_file_upload.php
index 5cc73a0ac..cb2f81b74 100644
--- a/application/test/tests/api_v2/test_file_upload.php
+++ b/application/test/tests/api_v2/test_file_upload.php
@@ -45,9 +45,13 @@ class test_file_upload extends common {
$this->t->ok(!empty($ret["data"]["urls"]), "got URLs");
foreach ($ret["data"]["urls"] as $url) {
+ # remove tailing /
+ $url = substr($url, 0, strlen($url) - 1);
$data[] = $this->SendHTTPRequest("GET", $url, '');
}
$this->t->ok($data[0] !== $data[1], 'Returned file contents should differ');
+ $this->t->ok($data[0] === file_get_contents("data/tests/message1.bin"), "Returned correct data for file 1");
+ $this->t->ok($data[1] === file_get_contents("data/tests/message2.bin"), "Returned correct data for file 2");
}
public function test_upload_uploadNothing()