diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml
index 751fdcea9..3175c1275 100644
--- a/app/views/users/edit.html.haml
+++ b/app/views/users/edit.html.haml
@@ -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
diff --git a/features/closes_account.feature b/features/closes_account.feature
index 6f6b0b24d..11242455a 100644
--- a/features/closes_account.feature
+++ b/features/closes_account.feature
@@ -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"