Compare commits
No commits in common. "a84296ae29bfcd23eb610697a3c2cb73eb207464" and "9054c25d0e6a5c15c8bccbbbf4a442bf5157bc52" have entirely different histories.
a84296ae29
...
9054c25d0e
1 changed files with 0 additions and 49 deletions
|
|
@ -1,49 +0,0 @@
|
|||
<?php
|
||||
|
||||
it('registers successfully', function () {
|
||||
visit('/register')
|
||||
->type('input[id="name"]', 'Test User')
|
||||
->type('input[id="email"]', 'new@example.com')
|
||||
->type('input[id="password"]', 'password123')
|
||||
->type('input[id="password_confirmation"]', 'password123')
|
||||
->press('Register')
|
||||
->assertPathIs('/dashboard')
|
||||
->assertSee('Test User');
|
||||
});
|
||||
|
||||
it('requires all registration fields', function () {
|
||||
visit('/register')
|
||||
->assertScript("document.querySelector('input[id=\"name\"]').required")
|
||||
->assertScript("document.querySelector('input[id=\"email\"]').required")
|
||||
->assertScript("document.querySelector('input[id=\"password\"]').required")
|
||||
->assertScript("document.querySelector('input[id=\"password_confirmation\"]').required")
|
||||
->assertAttribute('input[id="email"]', 'type', 'email')
|
||||
->assertAttribute('input[id="password"]', 'type', 'password')
|
||||
->assertAttribute('input[id="password_confirmation"]', 'type', 'password')
|
||||
->press('Register')
|
||||
->assertPathIs('/register');
|
||||
});
|
||||
|
||||
it('rejects a mismatched password confirmation', function () {
|
||||
visit('/register')
|
||||
->type('input[id="name"]', 'Test User')
|
||||
->type('input[id="email"]', 'new@example.com')
|
||||
->type('input[id="password"]', 'password123')
|
||||
->type('input[id="password_confirmation"]', 'different123')
|
||||
->press('Register')
|
||||
->assertPathIs('/register')
|
||||
->assertSee('confirmation does not match');
|
||||
});
|
||||
|
||||
it('rejects a duplicate email', function () {
|
||||
createPlanner('taken@example.com');
|
||||
|
||||
visit('/register')
|
||||
->type('input[id="name"]', 'Test User')
|
||||
->type('input[id="email"]', 'taken@example.com')
|
||||
->type('input[id="password"]', 'password123')
|
||||
->type('input[id="password_confirmation"]', 'password123')
|
||||
->press('Register')
|
||||
->assertPathIs('/register')
|
||||
->assertSee('has already been taken');
|
||||
});
|
||||
Loading…
Reference in a new issue