summaryrefslogtreecommitdiffstats
path: root/application/test/tests/test_api_v2.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-09-30 12:01:01 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-11-05 19:44:15 +0100
commit0306ddec3de436b683bc784574d5bf41584f2e14 (patch)
tree9290f91ba13003e8c75708b98c308d8bd4cb951f /application/test/tests/test_api_v2.php
parent88109ab1093711137e1341ce16f769467f2395e0 (diff)
tests: Fix testing of username/pw with unsupported endpoint
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/test/tests/test_api_v2.php')
-rw-r--r--application/test/tests/test_api_v2.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/application/test/tests/test_api_v2.php b/application/test/tests/test_api_v2.php
index 0e52de50b..05d7952c6 100644
--- a/application/test/tests/test_api_v2.php
+++ b/application/test/tests/test_api_v2.php
@@ -137,9 +137,9 @@ class test_api_v2 extends \test\Test {
{
$userid = $this->createUser(2);
$apikey = $this->createApikey($userid);
+ $apikey_full = $this->createApikey($userid, "full");
$ret = $this->CallEndpoint("POST", "user/apikeys", array(
- "username" => "apiv2testuser2",
- "password" => "testpass2",
+ "apikey" => $apikey_full,
));
$this->expectSuccess("get apikeys", $ret);
@@ -180,7 +180,7 @@ class test_api_v2 extends \test\Test {
public function test_authentication_invalidPassword()
{
$userid = $this->createUser(3);
- $ret = $this->CallEndpoint("POST", "user/apikeys", array(
+ $ret = $this->CallEndpoint("POST", "user/create_apikey", array(
"username" => "apiv2testuser3",
"password" => "wrongpass",
));
@@ -196,7 +196,7 @@ class test_api_v2 extends \test\Test {
public function test_authentication_invalidUser()
{
$userid = $this->createUser(4);
- $ret = $this->CallEndpoint("POST", "user/apikeys", array(
+ $ret = $this->CallEndpoint("POST", "user/create_apikey", array(
"username" => "apiv2testuserinvalid",
"password" => "testpass4",
));