jarektkaczyk / laravel-kahlan

Laravel context for kahlan specs/tests - allows nice BDD way of developing Laravel app. https://softonsofa.com
16 stars 10 forks source link

Transaction does not work while setting up in beforeAll() #8

Open rafallyczkowski opened 7 years ago

rafallyczkowski commented 7 years ago

Data persists when adding record through beforeAll() method.


describe('TestingModule', function() {
    using(['database transactions'], function() {
        beforeAll(function() {
            $this->str = factory(MyClass::class)->create(['type' => 'Event']);
        }); 
    });
});

it works when setting up with beforeEach() though.

jarektkaczyk commented 7 years ago

needs adjustments for Kahlan v3