So I am using laravel 5 form testing for my register pages which are split into 3 stages doing something like:
$this->visit('register/step-1')
->type($user->email, 'email')
->type($user->password, 'password')
->type($user->password, 'password_confirmation')
->check('terms')
->press('submit')
->type($user->first_name, 'first_name')
->type($user->last_name, 'last_name')
->press('submit')
->click('Skip')
->see(\Config::get('constants.success.user_registered'));
the first submit press passes because in the backend I am doing something like
User::create([
'email' => request->email //pardon the incorrect code
])
for second stage.. i am doing
$user_id = get id from session (basically the id created from first call above)
// find the user
User::update($request->all()); // this gives error
The error i get is "no such column: submit"..
But this is all working if i fill in the register steps 1 & 2 manually by going to the URL..
this is obv because i am doing request->all() when i remove submit from that array it works...
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community