Skip to content

Commit f9112ad

Browse files
committed
Add test for withBearerToken method
1 parent 9897e3f commit f9112ad

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/Foundation/Testing/Concerns/MakesHttpRequestsTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ public function testFromSetsHeaderAndSession()
1414
$this->assertSame('previous/url', $this->app['session']->previousUrl());
1515
}
1616

17+
public function testBearerTokenSetsHeader()
18+
{
19+
$this->withBearerToken('foobar');
20+
21+
$this->assertSame('Bearer foobar', $this->defaultHeaders['Authorization']);
22+
}
23+
1724
public function testWithoutAndWithMiddleware()
1825
{
1926
$this->assertFalse($this->app->has('middleware.disable'));

0 commit comments

Comments
 (0)