私は Devise を使用しており、ユーザーが自分のアカウントを削除するシナリオのテストを書いていますが、確認ボックスを呼び出して [OK] をクリックする方法に行き詰まっています。
リンクと私のテストは次のとおりです。
<p><%= link_to "Delete my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %></p>
スペック/リクエスト/users_spec.rb
scenario 'user deletes account' do
make_user_and_login
click_link('Account Settings')
page.should have_selector('title', :text => 'Account Settings')
click_link('Delete my account')
# Are You Sure?
# click OK in confirm box
# page.should etc.....
end
これはどのように行われますか?