Olá, tudo bem? Estou tendo o seguinte problema ao executar o php artisan test
:
• Tests\Feature\SeriesRepositoryTest > when a series is created its seasons and episoes must also be created
Failed asserting that a row in the table [seasons] matches the attributes {
"number": 1
}.
The table is empty.
at D:\Leonardo\Dev\Alura\php\laravel\tests\Feature\SeriesRepositoryTest.php:33
29▕ $result = $repository->add($request);
30▕
31▕ // Assert
32▕ $result = $this->assertDatabaseHas("series", ['name' => 'Nome da Série']);
➜ 33▕ $result = $this->assertDatabaseHas("seasons", ['number' => 1]);
34▕ $result = $this->assertDatabaseHas("episodes", ['number' => 1]);
35▕ }
36▕ }
37▕
1 D:\Leonardo\Dev\Alura\php\laravel\vendor\phpunit\phpunit\phpunit:107
PHPUnit\TextUI\Command::main()
Tests: 2 failed, 22 passed
Time: 4.73s
Infelizmente não consegui achar o motivo desta falha, se alguém puder me ajudar eu agradeçio.
O código está no meu GitHub: https://github.com/leonardofgonzaga/alura-laravel/tree/test