summaryrefslogtreecommitdiffstats
path: root/application/test
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-10-07 13:59:45 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-10-31 09:32:14 +0100
commit30dd61eb23d64f26c595ffe5c95d8fc2ee328753 (patch)
tree68cdd621f2a412a8f9fa062d446f18f76545ea29 /application/test
parent737a50bb2e63911490c78af630e50dfbfb6de25a (diff)
Disable special handling of {elapsed_time} and {memory_usage}
Documentation says that the variable can be set from the controller, but it's protected and thus throws and exception. Good documentation is hard to come by... Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/test')
-rw-r--r--application/test/tests/test_api_v2.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/application/test/tests/test_api_v2.php b/application/test/tests/test_api_v2.php
index b50af4bcf..7335c3bdd 100644
--- a/application/test/tests/test_api_v2.php
+++ b/application/test/tests/test_api_v2.php
@@ -359,6 +359,19 @@ class test_api_v2 extends \test\Test {
$this->t->is($ret["data"]["total_size"], 0, "total_size = 0 since no uploads");
}
+ public function test_history_specialVarsNotExpanded()
+ {
+ $apikey = $this->createUserAndApikey();
+ $uploadid = $this->uploadFile($apikey, "data/tests/{elapsed_time}.txt")['data']['ids'][0];
+
+ $ret = $this->CallEndpoint("POST", "file/history", array(
+ "apikey" => $apikey,
+ ));
+ $this->expectSuccess("get history", $ret);
+
+ $this->t->is($ret["data"]["items"][$uploadid]['filename'], '{elapsed_time}.txt', "{elapsed_time} is not expanded in history reply");
+ }
+
public function test_delete_canDeleteUploaded()
{
$apikey = $this->createUserAndApikey();