Commit f841ba2a authored by Victor Friboulet's avatar Victor Friboulet
Browse files

:fix: feature test correction

parent f43e899b
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
class ConnexionTest extends TestCase
{
    /**
     * @description test if the site crash when right connexion credentials are sent
     * @description test if the site redirects when right connexion credentials are sent
     *
     * @return void
     */
@@ -16,7 +16,7 @@ public function test_right_login()
    {
        $response = $this->post('/login',['mail'=>'john.doe@gmail.com','password'=>'securepassword']);

        $response->assertStatus(200);
        $response->assertStatus(302);
    }
    /**
     * @description test if the site crash when wrong connexion credentials are sent
@@ -36,9 +36,9 @@ public function test_wrong_login()
     */
    public function test_right_login_view()
    {
        $response = $this->post('/login',['mail'=>'john.doe@gmail.com','password'=>'securepassword']);
        $response = $this->followingRedirects()->post('/login',['mail'=>'john.doe@gmail.com','password'=>'securepassword']);

        $response->assertSee('<span class="block text-sm text-white">John Doe</span>');
        $response->assertSee('John Doe');
    }
    /**
     * @description test if the connexion show the right thing when the wrong credentials are sent
@@ -47,8 +47,8 @@ public function test_right_login_view()
     */
    public function test_wrong_login_view()
    {
        $response = $this->post('/login',['mail'=>'wrong@email.com','password'=>'wrongpassword']);
        $response = $this->followingRedirects()->post('/login',['mail'=>'wrong@email.com','password'=>'wrongpassword']);

        $response->assertSee('<h1 class="font-bold text-3xl text-white-900">Wrong password !</h1>');
        $response->assertSee('Wrong password !');
    }
}