Acceptable Unit Test?

Posted 8 months ago by andremac96

Is this an acceptable test? I have a user model with the following fields. Name, Email, Password and UserType. I'm testing the register page. This is the testing code

public function testExample()
  {
    $this->visit('/register') 
    ->type('Andre MacNamara', 'name') 
    ->type('[email protected]', 'email') 
    ->type('Landlord', 'userType') 
    ->type('password', 'password') 
    ->press('Register') 
    ->seePageIs('/register'); }

The form has all the fields above. This is the ouput from the unit test.

Image https://i.redd.it/g4g9ehvvs8x01.png

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.