koel/tests/Feature/ProfileTest.php

22 lines
559 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\DatabaseTransactions;
use Illuminate\Foundation\Testing\WithoutMiddleware;
2017-02-14 06:53:02 +00:00
use Tests\BrowserKitTestCase;
2016-05-30 05:50:59 +00:00
2017-02-14 06:53:02 +00:00
class ProfileTest extends BrowserKitTestCase
2016-05-30 05:50:59 +00:00
{
use WithoutMiddleware, DatabaseTransactions;
public function testUpdate()
{
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']);
}
}