diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-04-16 10:48:25 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-04-20 13:00:02 +0200 |
commit | 9bc48451b939df58b7e7e90300c9c716c348027f (patch) | |
tree | ca5e8858f60e8f479a4bb299b26d867bbfda7ab6 /tests/settings/controller | |
parent | 89353695648eb686e6fffd49f86a6d014121f551 (diff) | |
download | nextcloud-server-9bc48451b939df58b7e7e90300c9c716c348027f.tar.gz nextcloud-server-9bc48451b939df58b7e7e90300c9c716c348027f.zip |
Adjust tests and statuscode
Diffstat (limited to 'tests/settings/controller')
-rw-r--r-- | tests/settings/controller/CertificateControllerTest.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/settings/controller/CertificateControllerTest.php b/tests/settings/controller/CertificateControllerTest.php index 363175cca41..b6981195034 100644 --- a/tests/settings/controller/CertificateControllerTest.php +++ b/tests/settings/controller/CertificateControllerTest.php @@ -141,7 +141,7 @@ class CertificateControllerTest extends \Test\TestCase { $this->assertEquals($expected, $this->certificateController->addPersonalRootCertificate()); } - public function testAddPersonalRootCertificateInValidCertificate() { + public function testAddPersonalRootCertificateInvalidCertificate() { $uploadedFile = [ 'tmp_name' => __DIR__ . '/../../data/certificates/badCertificate.crt', 'name' => 'badCertificate.crt', @@ -155,10 +155,10 @@ class CertificateControllerTest extends \Test\TestCase { $this->certificateManager ->expects($this->once()) ->method('addCertificate') - ->with(file_get_contents($uploadedFile['tmp_name'], 'goodCertificate.crt')) + ->with(file_get_contents($uploadedFile['tmp_name'], 'badCertificate.crt')) ->will($this->throwException(new \Exception())); - $expected = new DataResponse('An error occurred.', Http::STATUS_INTERNAL_SERVER_ERROR); + $expected = new DataResponse('An error occurred.', Http::STATUS_UNPROCESSABLE_ENTITY); $this->assertEquals($expected, $this->certificateController->addPersonalRootCertificate()); } |