Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <p><%= link_to "Delete my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %></p>
- 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
- page.driver.browser.switch_to.alert.accept
- page.driver.browser.switch_to.alert.dismiss
- page.evaluate_script('window.confirm = function() { return true; }')
- page.should have_content "Account deleted"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement