Closed ryohakjae114 closed 3 months ago
def update if @user.update(user_params) redirect_to root_path, notice: t('users.update.success') else render :edit, status: :unprocessable_entity end end
sign_in user visit profile_user_path(user) fill_in 'プロフィール情報', with: 'りょはっちぇです' fill_in 'ブログURL', with: 'https://hakjae@example.com' click_button '更新する' expect(page).to have_content('公開情報を変更しました') expect(find_field('name').value).to eq 'りょはっちぇです' expect(find_field('name').value).to eq 'https://hakjae@example.com'