koel/tests/Feature/ProfileTest.php

21 lines
475 B
PHP
Raw Normal View History

2016-05-30 05:50:59 +00:00
<?php
2017-02-14 06:53:02 +00:00
namespace Tests\Feature;
2016-05-30 05:50:59 +00:00
use App\Models\User;
use Illuminate\Foundation\Testing\WithoutMiddleware;
2017-08-05 16:56:11 +00:00
class ProfileTest extends TestCase
2016-05-30 05:50:59 +00:00
{
2017-08-05 16:56:11 +00:00
use WithoutMiddleware;
2016-05-30 05:50:59 +00:00
2017-08-05 18:55:02 +00:00
/** @test */
public function user_can_update_his_profile()
2016-05-30 05:50:59 +00:00
{
2017-02-14 06:53:02 +00:00
$user = factory(User::class)->create();
$this->putAsUser('api/me', ['name' => 'Foo', 'email' => 'bar@baz.com'], $user);
2016-05-30 05:50:59 +00:00
$this->seeInDatabase('users', ['name' => 'Foo', 'email' => 'bar@baz.com']);
}
}