- // Fake notifications
- Notification::fake();
-
- // Set settings and get user instance
- $this->setSettings(['registration-enabled' => 'true', 'registration-confirmation' => 'true']);
- $user = factory(\BookStack\User::class)->make();
-
- // Go through registration process
- $this->visit('/register')
- ->see('Sign Up')
- ->type($user->name, '#name')
- ->type($user->email, '#email')
- ->type($user->password, '#password')
- ->press('Create Account')
- ->seePageIs('/register/confirm')
- ->seeInDatabase('users', ['name' => $user->name, 'email' => $user->email, 'email_confirmed' => false]);
+ $this->asAdmin()->get('/')->assertOk();
+ $this->post('/logout')->assertRedirect('/');
+ $this->get('/')->assertRedirect('/login');
+ }