lundi 29 janvier 2018

Method [click] does not exist on Redirect

how I can fix this issue, this is my code

public function testAdminSucceslogin()
        {
    //        App::setLocale('en');
            $user = factory(User::class)->create([
                'password' => 'secret',
                'status' => User::STATUS_ACTIVE,
                'type' => User::TYPE_ADMIN
            ]);

            $this->get(route('login'))
                ->assertStatus(200)
                ->assertSee('تذكرني')
                ->assertSee('نسيت كلمة المرور؟')
                ->assertSee('تسجيل الدخول');

            $this->post(route('post.login'),[$user->email, 'secret'])
                 ->click('Login')
                 ->assertStatus(302)
                 ->assertRedirect(route('backendDashboard'));

            $user->delete();
        }

I tried click and press and both have same error and issue text

Aucun commentaire:

Enregistrer un commentaire