Merge branch 'added_feature_close_account' of https://github.com/jairodiaz/diaspora
This commit is contained in:
commit
bd6617ea55
3 changed files with 36 additions and 2 deletions
28
features/closes_account.feature
Normal file
28
features/closes_account.feature
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
@javascript
|
||||
Feature: Close Account
|
||||
In order to close an existing account
|
||||
As a user
|
||||
I want to sign in, close my account and try to log in again
|
||||
|
||||
Scenario: user closes account
|
||||
Given a user with username "ohai" and password "secret"
|
||||
When I go to the new user session page
|
||||
And I fill in "Username" with "ohai"
|
||||
And I fill in "Password" with "secret"
|
||||
And I press "Sign in"
|
||||
Then I should be on the aspects page
|
||||
|
||||
When I click on my name in the header
|
||||
And I follow "account settings"
|
||||
And I click ok in the confirm dialog to appear next
|
||||
And I follow "Close Account"
|
||||
Then I should be on the home page
|
||||
|
||||
When I go to the new user session page
|
||||
And I fill in "Username" with "ohai"
|
||||
And I fill in "Password" with "secret"
|
||||
And I press "Sign in"
|
||||
#Then I should not be on the aspects page
|
||||
Then I should be on the new user session page
|
||||
And I wait for the ajax to finish
|
||||
Then I should see "Invalid email or password."
|
||||
|
|
@ -62,3 +62,9 @@ end
|
|||
When /^I have turned off jQuery effects$/ do
|
||||
evaluate_script("$.fx.off = true")
|
||||
end
|
||||
|
||||
When /^I click ok in the confirm dialog to appear next$/ do
|
||||
evaluate_script <<-JS
|
||||
window.confirm = function() { return true; };
|
||||
JS
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Given /^a user with username "([^\"]*)" and password "([^\"]*)"$/ do |username, password|
|
||||
user = Factory(:user, :username => username, :password => password,
|
||||
@me ||= Factory(:user, :username => username, :password => password,
|
||||
:password_confirmation => password, :getting_started => false)
|
||||
user.aspects.create(:name => "Besties")
|
||||
@me.aspects.create(:name => "Besties")
|
||||
end
|
||||
|
||||
Given /^a user with email "([^\"]*)"$/ do |email|
|
||||
|
|
|
|||
Loading…
Reference in a new issue