Skip to content

Commit

Permalink
Update tapioca
Browse files Browse the repository at this point in the history
  • Loading branch information
jlbelanger committed Feb 24, 2024
1 parent 1411757 commit 9ec561f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class User extends Authenticatable
public function getAuthInfo(bool $remember) : array
{
return [
'id' => $this->id,
'id' => $this->getKey(),
'remember' => $remember,
];
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"require": {
"php": "^8.2",
"guzzlehttp/guzzle": "^7.8.1",
"jlbelanger/tapioca": "dev-main#8032ccc2cc982b312e368f2b04a59f4583f36bbe",
"jlbelanger/tapioca": "dev-main#39ccb63e70662b1c32701082443c1c3505cff702",
"laravel/framework": "^10.35.0",
"laravel/sanctum": "^3.3.2",
"laravel/tinker": "^2.8.2"
Expand Down
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion tests/Feature/AuthLoginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class AuthLoginTest extends TestCase
{
use RefreshDatabase;

protected $user;

protected function setUp() : void
{
parent::setUp();
Expand Down Expand Up @@ -213,7 +215,7 @@ public function testLogin(array $args) : void
{
$response = $this->json('POST', '/api/auth/login', $args['body']);

$args['response'] = $this->replaceToken('%id%', $this->user->id, $args['response']);
$args['response'] = $this->replaceToken('%id%', $this->user->getKey(), $args['response']);
if (!empty($response['token'])) {
$args['response'] = $this->replaceToken('%token%', $response['token'], $args['response']);
}
Expand Down

0 comments on commit 9ec561f

Please sign in to comment.