Skip to content

Commit

Permalink
Cover new functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
simonv3 committed Apr 8, 2015
1 parent acc0e12 commit 133e41d
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions spec/features/user_sessions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,25 @@
expect(page).to have_content('I told you kids to get out of here!')
end

# it 'should redirect the user to their finish page after sign up' do
# visit new_user_registration_path
# fill_in :user_display_name, with: 'Rick'
# fill_in :user_password, with: 'password123'
# fill_in :user_email, with: '[email protected]'
# check :user_agree
# click_button 'Create account'
# expect(page).to have_content("Welcome Rick")
# end

# it 'should redirect the user to the page they were viewing after sign up' do
# visit "/guides/new"
# see ("You need to sign in or sign up before continuing.")
# click_link "Sign up"
# fill_in :user_display_name, with: 'Rick'
# fill_in :user_password, with: 'password123'
# fill_in :user_email, with: '[email protected]'
# check :user_agree
# click_button 'Create account'
# expect(page).to have_content(I18n::t('guides.new.new_guide_steps.create_a_growing_guide'))
# end
it 'should redirect the user to their finish page after sign up' do
visit new_user_registration_path
fill_in :user_display_name, with: 'Rick'
fill_in :user_password, with: 'password123'
fill_in :user_email, with: '[email protected]'
click_button 'Join OpenFarm'
expect(page).to have_content('Thanks for joining!')
end

it 'should redirect the user to the page they were viewing after sign up' do
visit "/guides/new"
see ("You need to sign in or sign up before continuing.")
page.first(:link, 'Become a Member').click
fill_in :user_display_name, with: 'Rick'
fill_in :user_password, with: 'password123'
fill_in :user_email, with: '[email protected]'
click_button 'Join OpenFarm'
expect(page).to have_content(I18n::t('guides.new.new_guide_steps.create_a_growing_guide'))
end

it 'should create a new garden for a newly registered user' do
usr = sign_up_procedure
Expand Down

0 comments on commit 133e41d

Please sign in to comment.