Skip to content

Commit

Permalink
Update Headers.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ManukMinasyan authored Apr 17, 2024
1 parent 6ea4c7e commit a9d53cc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/ValueObjects/Transporter/Headers.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@
]);
});

it('can have project', function () {
$headers = Headers::withAuthorization(ApiKey::from('foo'))
->withContentType(ContentType::JSON)
->withProject('openai_proj');

expect($headers->toArray())->toBe([
'Authorization' => 'Bearer foo',
'Content-Type' => 'application/json',
'OpenAI-Project' => 'openai_proj',
]);
});

it('can have custom header', function () {
$headers = Headers::withAuthorization(ApiKey::from('foo'))
->withContentType(ContentType::JSON)
Expand Down

0 comments on commit a9d53cc

Please sign in to comment.