Skip to content

Commit

Permalink
Update ClientTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kawax committed Oct 14, 2024
1 parent 9153846 commit cf5ee17
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions tests/Feature/Client/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function test_resolve_handle()
->push(['did' => 'test']);

$response = Bluesky::login(identifier: 'identifier', password: 'password')
->resolveHandle(handle: 'test');
->resolveHandle(handle: 'alice.test');

$this->assertTrue($response->collect()->has('did'));
$this->assertSame('test', $response->json('did'));
Expand Down Expand Up @@ -195,7 +195,29 @@ public function test_resolve_did_unsupported()

Http::fake();

$response = Bluesky::resolveDID(did: 'test');
$response = Bluesky::resolveDID(did: 'did:test:test');

Http::assertNothingSent();
}

public function test_resolve_handle_invalid()
{
$this->expectException(InvalidArgumentException::class);

Http::fake();

$response = Bluesky::resolveHandle(handle: 'invalid');

Http::assertNothingSent();
}

public function test_resolve_did_invalid()
{
$this->expectException(InvalidArgumentException::class);

Http::fake();

$response = Bluesky::resolveDID(did: 'did:test');

Http::assertNothingSent();
}
Expand Down

0 comments on commit cf5ee17

Please sign in to comment.