diff options
Diffstat (limited to 'application/test/tests')
-rw-r--r-- | application/test/tests/api_v2/test_file_upload.php | 4 |
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() |