MS DG; fixed close account cukes

This commit is contained in:
danielgrippi 2011-12-07 17:15:46 -08:00 committed by Maxwell Salzberg
parent 7bf1970dd8
commit 342593988b
2 changed files with 14 additions and 11 deletions

View file

@ -164,10 +164,9 @@
= link_to t('.download_photos'), "#", :class => "button", :id => "photo-export-button", :title => t('.photo_export_unavailable')
.span-5.last
%h3
%h3
= t('.close_account')
.button
=link_to 'Close Account', '#close_account_pane', :rel => 'facebox'
=link_to 'Close Account', '#close_account_pane', :rel => 'facebox', :class => "button"
.hidden#close_account_pane{:rel => 'facebox'}
#inner_account_delete

View file

@ -8,22 +8,24 @@ Feature: Close Account
Given I am signed in
When I click on my name in the header
And I follow "Settings"
And I put in my password in "close_account_password"
And I follow "Close Account"
And I put in my password in "close_account_password" in the modal window
And I preemptively confirm the alert
And I press "Close Account"
And I press "Close Account" in the modal window
Then I should be on the new user session page
When I try to sign in manually
Then I should be on the new user session page
When I wait for the ajax to finish
Then I should see "Invalid email or password."
Then I should see "Your account is locked."
Scenario: user is forced to enter something in the password field on closing account
Given I am signed in
When I click on my name in the header
And I follow "Settings"
And I follow "Close Account"
And I preemptively confirm the alert
And I press "Close Account"
And I press "Close Account" in the modal window
Then I should be on the edit user page
And I should see "Please enter your current password to close your account."
@ -31,9 +33,10 @@ Feature: Close Account
Given I am signed in
When I click on my name in the header
And I follow "Settings"
And I follow "Close Account"
And I preemptively confirm the alert
And I fill in "close_account_password" with "none sense"
And I press "Close Account"
And I fill in "close_account_password" with "none sense" in the modal window
And I press "Close Account" in the modal window
Then I should be on the edit user page
And I should see "The entered password didn't match your current password."
@ -50,9 +53,10 @@ Feature: Close Account
Then I sign in as "bob@bob.bob"
When I click on my name in the header
And I follow "Settings"
And I put in my password in "close_account_password"
And I follow "Close Account"
And I put in my password in "close_account_password" in the modal window
And I preemptively confirm the alert
And I press "Close Account"
And I press "Close Account" in the modal window
Then I sign in as "alice@alice.alice"
And I am on the home page
Then I should see "Hi, Bob Jones long time no see"