diff --git a/tests/Feature/Client/ClientTest.php b/tests/Feature/Client/ClientTest.php index 755fba1a..aab20da6 100644 --- a/tests/Feature/Client/ClientTest.php +++ b/tests/Feature/Client/ClientTest.php @@ -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')); @@ -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(); }