Skip to content

Commit

Permalink
changes to pass tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hadimansouri committed Aug 10, 2019
1 parent 9c58137 commit cd2fa61
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
13 changes: 13 additions & 0 deletions src/SDP/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,19 @@ public function getGeneralParam()
'defaultValue' => 'description',
'validators' => []
);
$params[] = array(
'name' => 'home',
'type' => 'String',
'unit' => 'none',
'title' => 'Home',
'description' => 'Home address of drive',
'editable' => true,
'visible' => true,
'priority' => 5,
'symbol' => 'home',
'defaultValue' => '',
'validators' => []
);
$params[] = array(
'name' => 'symbol',
'type' => 'String',
Expand Down
4 changes: 2 additions & 2 deletions tests/Drive/DriveTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ public function shouldOwnerCanCreateDrive() {
Test_Assert::assertResponseStatusCode ( $response, 200, 'Find status code is not 200' );
$actual = json_decode($response->content, true);
$this->assertEquals($actual['driver'], $params['type']);
$this->assertEquals($actual['symbole'], $params['symbol']);
$this->assertEquals($actual['home'], $params['home']);
$this->assertEquals($actual['symbol'], $params['symbol']);
$this->assertEquals($actual['title'], $params['title']);
$this->assertEquals($actual['home'], $params['home']);
$drive = new SDP_Drive($actual['id']);
$this->assertEquals($drive->getMeta('encrypt_key'), $params['encrypt_key']);
$this->assertEquals($drive->getMeta('decrypt_key'), $params['decrypt_key']);
Expand Down
3 changes: 2 additions & 1 deletion tests/Driver/CactusTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ public function init()
$this->drive = new SDP_Drive();
$this->drive->title = 'CactusDrive-' . rand();
$this->drive->home = 'www.test.com';
$this->drive->setMeta('key', $this->jwt_key);
$this->drive->setMeta('encrypt_key', $this->jwt_key);
$this->drive->setMeta('decrypt_key', $this->jwt_key);
$this->drive->setMeta('algorithm', $this->jwt_alg);
$this->drive->driver = 'cactus';
Test_Assert::assertTrue($this->drive->create(), 'Impossible to create cactus drive');
Expand Down

0 comments on commit cd2fa61

Please sign in to comment.