Level 26
it is bugging me too. For the time being I am using 'DatabaseMigrations'.
Hi there,
I am using mysql as a testing database. I am trying to rollback the changes after each test using RefreshDatabase trait but it is not working.
use RefreshDatabase;
protected $connectionsToTransact = [
'mysql_testing'
];
/** @test */
public function user_can_add_custom_field()
{
$this->signIn();
$attributes = [
'name' => 'Make',
'type' => 'text'
];
$response = $this->postJson('/api/custom-fields', $attributes);
$response->assertStatus(201);
$this->assertDatabaseHas('mrp_custom_fields', $attributes);
}
My MySql engine is InnoDB. After running this test. I am still seeing the record in mysql database.
Please or to participate in this conversation.