2017-12-09 22:39:34 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Tests\Integration\Models;
|
|
|
|
|
|
|
|
use App\Models\User;
|
|
|
|
use Tests\TestCase;
|
|
|
|
|
|
|
|
class UserTest extends TestCase
|
|
|
|
{
|
2017-12-10 00:23:37 +00:00
|
|
|
/** @test */
|
|
|
|
public function sensitive_preferences_are_hidden()
|
|
|
|
{
|
|
|
|
/** @var User $user */
|
|
|
|
$user = factory(User::class)->create([
|
|
|
|
'preferences' => ['lastfm_session_key' => 'foo'],
|
|
|
|
]);
|
2017-12-09 22:39:34 +00:00
|
|
|
|
2017-12-10 00:23:37 +00:00
|
|
|
$value = $user->preferences['lastfm_session_key'];
|
2018-09-04 05:34:02 +00:00
|
|
|
self::assertEquals('hidden', $value);
|
2017-12-10 00:23:37 +00:00
|
|
|
}
|
2017-12-09 22:39:34 +00:00
|
|
|
}
|