From b84836ed9539974e3a5b1c0852f69ce84f48f0ec Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Wed, 2 Feb 2011 14:22:07 -0800 Subject: [PATCH] Merging close_account.feature and closes_account.feature --- features/close_account.feature | 17 ----------------- features/closes_account.feature | 15 +++------------ features/step_definitions/session_steps.rb | 3 +++ 3 files changed, 6 insertions(+), 29 deletions(-) delete mode 100644 features/close_account.feature diff --git a/features/close_account.feature b/features/close_account.feature deleted file mode 100644 index da9fc0e1e..000000000 --- a/features/close_account.feature +++ /dev/null @@ -1,17 +0,0 @@ -@javascript -Feature: close_account -In order to remove my diaspora account -As a User -I want to close my account - - - - -Scenario: close my account - Given I am signed in - And I click on my name in the header - And I follow "account settings" - And I preemptively confirm the alert - And I follow "Close Account" - Then I should be on the home page - diff --git a/features/closes_account.feature b/features/closes_account.feature index 70aee5bfc..69e919123 100644 --- a/features/closes_account.feature +++ b/features/closes_account.feature @@ -5,13 +5,7 @@ Feature: Close Account 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 - + Given I am signed in 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 @@ -19,10 +13,7 @@ Feature: 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 + And I try to sign in Then I should be on the new user session page - And I wait for the ajax to finish + When I wait for the ajax to finish Then I should see "Invalid email or password." diff --git a/features/step_definitions/session_steps.rb b/features/step_definitions/session_steps.rb index 1b427c94b..d3547f178 100644 --- a/features/step_definitions/session_steps.rb +++ b/features/step_definitions/session_steps.rb @@ -9,6 +9,9 @@ Given /^I (?:am signed|sign) in as an? (\w+)$/ do |role| Given 'I am signed in' end +Given "I try to sign in" do + Given "I am signed in" +end Given 'I am signed in' do @me ||= Factory(:user_with_aspect, :getting_started => false)