I've been following the Testing Laravel series on Laracasts and am now trying to set up a project according to the TDD and wishfull thinking principles.
Well, I'm at my second test, and I'm confused whether or not it should be a test at all. I have a Customer model that I'd like to test for creation. But I'm unsure how to do this, since factory(Customer::class)->create();
already creates a Customer.
What would insert/update tests for a Model look like? Are they not neccesary or am I setting up my tests in the wrong way?
At the moment this is my test:
/** @test */
public function it_can_add_a_customer()
{
factory(Customer::class)->create();
$customers = Customer::all();
$this->assertCount(1, $customers);
}