Skip to content

Commit

Permalink
Update ClientTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kawax committed Nov 23, 2024
1 parent e7c8fa9 commit d99090b
Showing 1 changed file with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion tests/Feature/Client/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

class ClientTest extends TestCase
{
protected array $session = ['accessJwt' => 'test', 'refreshJwt' => 'test', 'did' => 'test', 'handle' => 'handle'];
protected array $session = ['accessJwt' => 'test', 'refreshJwt' => 'test', 'did' => 'test', 'handle' => 'handle', 'didDoc' => ['service' => [['id' => '#atproto_pds', 'serviceEndpoint' => 'https://pds']]]];

protected function setUp(): void
{
Expand Down Expand Up @@ -544,4 +544,43 @@ public function test_search_posts()

$this->assertTrue($response->successful());
}

public function test_video_upload()
{
Http::fakeSequence()
->push($this->session)
->push(['token' => 'test'])
->push([]);

$response = Bluesky::login('id', 'pass')
->uploadVideo(data: '', type: 'video/mp4');

$this->assertTrue($response->successful());
}

public function test_video_status()
{
Http::fakeSequence()
->push($this->session)
->push(['token' => 'test'])
->push([]);

$response = Bluesky::login('id', 'pass')
->getJobStatus(jobId: 'id');

$this->assertTrue($response->successful());
}

public function test_video_limits()
{
Http::fakeSequence()
->push($this->session)
->push(['token' => 'test'])
->push([]);

$response = Bluesky::login('id', 'pass')
->getUploadLimits();

$this->assertTrue($response->successful());
}
}

0 comments on commit d99090b

Please sign in to comment.