koel/tests/ProfileTest.php

19 lines
487 B
PHP
Raw Normal View History

2016-05-30 05:50:59 +00:00
<?php
use App\Models\User;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Foundation\Testing\WithoutMiddleware;
class ProfileTest extends TestCase
{
use WithoutMiddleware, DatabaseTransactions;
public function testUpdate()
{
$this->actingAs(factory(User::class)->create())
->put('api/me', ['name' => 'Foo', 'email' => 'bar@baz.com']);
$this->seeInDatabase('users', ['name' => 'Foo', 'email' => 'bar@baz.com']);
}
}