Permalink
Browse files

wip

  • Loading branch information...
1 parent 6ad1068 commit 31d1090295a37b56895805e4790b251e980eabf9 @mike-burns mike-burns committed Jul 20, 2012
@@ -15,19 +15,12 @@ def create
sign_in(@user)
redirect_back_or(url_after_create)
else
- flash_failure_after_create
render :template => 'users/new'
end
end
private
- def flash_failure_after_create
- flash.now[:notice] = translate(:bad_email_or_password,
- :scope => [:clearance, :controllers, :passwords],
- :default => "Must be a valid email address. Password can't be blank.")
- end
-
def url_after_create
'/'
end
@@ -6,11 +6,11 @@ Feature: Sign up
Scenario: Visitor signs up with invalid email
When I sign up with "invalidemail" and "password"
- Then I am told to enter a valid email address
+ Then I should be signed out
Scenario: Visitor signs up with blank password
When I sign up with "email@example.com" and ""
- Then I am told to enter a password
+ Then I should be signed out
Scenario: Visitor signs up with valid data
When I sign up with "email@example.com" and "password"
@@ -115,10 +115,6 @@
page.should have_content("Unknown email")
end
-Then /^I am told to enter a valid email address$/ do
- page.should have_content("Must be a valid email address")
-end
-
Then /^I am told to enter a password$/ do
page.should have_content("Password can't be blank")
end

0 comments on commit 31d1090

Please sign in to comment.