Feature: Sign up In order to get access to protected sections of the site A user Should be able to sign up Background: Given a plan exists with a name of "Free" Scenario: User signs up with invalid data When I go to the sign up page for the "Free" plan And I fill in "Email" with "invalidemail" And I fill in "Password" with "password" And I fill in "Confirm password" with "" And I press "Sign up" Then I should see error messages Scenario: User signs up with valid data When I go to the list of plans page And I follow "Free" And I fill in "Email" with "email@person.com" And I fill in "Password" with "password" And I fill in "Confirm password" with "password" And I fill in "Your name" with "Robot" And I fill in "Company Name" with "Robots, Inc" And I fill in "Account URL" with "robotsinc" And I press "Sign up" Then I should see "Instructions for confirming" And a confirmation message should be sent to "email@person.com" And the user "email@person.com" should be an admin of "Robots, Inc" Scenario: User confirms his account Given I signed up with "email@person.com/password" When I follow the confirmation link sent to "email@person.com" Then I should see "Confirmed email and signed in" And I should be signed in Scenario: Signed in user clicks confirmation link again Given I signed up with "email@person.com/password" When I follow the confirmation link sent to "email@person.com" Then I should be signed in When I follow the confirmation link sent to "email@person.com" Then I should see "Confirmed email and signed in" And I should be signed in Scenario: Signed out user clicks confirmation link again Given I signed up with "email@person.com/password" When I follow the confirmation link sent to "email@person.com" Then I should be signed in When I sign out And I follow the confirmation link sent to "email@person.com" Then I should see "Already confirmed email. Please sign in." And I should be signed out