Skip to content

Commit 3933ee1

Browse files
committed
Cover new secret key options with unit tests
1 parent c9de9a6 commit 3933ee1

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Diff for: tests/SecretKeyTest.php

+17
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,23 @@ public function testCreate()
1414
static::$_client->secretKey()->delete($keyId);
1515
}
1616

17+
public function testCreateAutoIp()
18+
{
19+
$keyId = static::$_client->secretKey()->create();
20+
$this->assertNotEmpty($keyId);
21+
static::$_client->secretKey()->delete($keyId);
22+
}
23+
24+
public function testCreateWithDescription()
25+
{
26+
$keyId = static::$_client->secretKey()->create('192.168.0.1', 'test key');
27+
$keyInfo = static::$_client->secretKey()->get($keyId);
28+
29+
$this->assertEquals('test key', $keyInfo->description);
30+
31+
static::$_client->secretKey()->delete($keyId);
32+
}
33+
1734
public function testGet()
1835
{
1936
$keyId = static::$_client->secretKey()->create('192.168.0.1');

0 commit comments

Comments
 (0)