From fdb2cd4105b4fd273c32c5c2fa6b6c93d46e7182 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 14 Oct 2016 11:51:59 +0200 Subject: test_file_upload: Ensure we compare the correct content Signed-off-by: Florian Pritz --- application/test/tests/api_v2/test_file_upload.php | 4 ++++ 1 file changed, 4 insertions(+) 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() -- cgit v1.2.3-24-g4f1b