Implement user registration feature
* Add users/new action and view * Add users/create action * Add link to sign up in sign in page
This commit is contained in:
@@ -15,3 +15,9 @@ Feature: User
|
||||
Then I should be redirected to the sign in page
|
||||
When I submit valid credentials
|
||||
Then I should be redirected to the home page
|
||||
|
||||
Scenario: User registration
|
||||
Given I go to the home page
|
||||
When I follow the sign up link
|
||||
And I fill in the sign up form
|
||||
Then I should be redirected to the home page
|
||||
|
@@ -21,3 +21,15 @@ When /^I submit valid credentials$/ do
|
||||
fill_in('Password', :with => user.password)
|
||||
click_button('Sign in')
|
||||
end
|
||||
|
||||
When /^I follow the sign up link$/ do
|
||||
click_link('Sign up')
|
||||
end
|
||||
|
||||
When /^I fill in the sign up form$/ do
|
||||
@user = Factory.build(:user)
|
||||
fill_in('Email', :with => @user.email)
|
||||
fill_in('Password', :with => @user.password)
|
||||
fill_in('Password confirmation', :with => @user.password)
|
||||
click_button('Sign up')
|
||||
end
|
||||
|
Reference in New Issue
Block a user