Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-burns committed Jul 20, 2012
1 parent 6ad1068 commit 31d1090
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
7 changes: 0 additions & 7 deletions app/controllers/clearance/users_controller.rb
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions features/engine/visitor_signs_up.feature
Expand Up @@ -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"
Expand Down
4 changes: 0 additions & 4 deletions features/step_definitions/engine/clearance_steps.rb
Expand Up @@ -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
Expand Down

0 comments on commit 31d1090

Please sign in to comment.