From 5abfcabe8b4b52a14edef2444bdb6cf014b9ccaf Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Mon, 27 Oct 2014 17:25:37 -0700 Subject: [PATCH] more test fixes --- tests/acceptance/signin_tests.rb | 22 ++++++++-------------- tests/acceptance/signup_tests.rb | 2 ++ 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/tests/acceptance/signin_tests.rb b/tests/acceptance/signin_tests.rb index df3d4e92..969d274b 100644 --- a/tests/acceptance/signin_tests.rb +++ b/tests/acceptance/signin_tests.rb @@ -38,29 +38,23 @@ describe 'signin' do end it 'signs in with proper credentials' do - visit '/' - click_button 'Create My Site' - fill_in_valid_signup - click_button 'Create Home Page' - Capybara.reset_sessions! + pass = SecureRandom.hex + @site = Fabricate :site, password: pass visit '/' click_link 'Sign In' - fill_in 'username', with: @site[:username] - fill_in 'password', with: @site[:password] + fill_in 'username', with: @site.username + fill_in 'password', with: pass click_button 'Sign In' page.must_have_content 'Your Feed' end it 'signs in with email' do - visit '/' - click_button 'Create My Site' - fill_in_valid_signup - click_button 'Create Home Page' - Capybara.reset_sessions! + pass = SecureRandom.hex + @site = Fabricate :site, password: pass visit '/' click_link 'Sign In' - fill_in 'username', with: @site[:email] - fill_in 'password', with: @site[:password] + fill_in 'username', with: @site.email + fill_in 'password', with: pass click_button 'Sign In' page.must_have_content 'Your Feed' end diff --git a/tests/acceptance/signup_tests.rb b/tests/acceptance/signup_tests.rb index 5b5f22fd..f29eddc6 100644 --- a/tests/acceptance/signup_tests.rb +++ b/tests/acceptance/signup_tests.rb @@ -104,6 +104,8 @@ describe 'signup' do page.must_have_content /email.+exists/ end +puts "$$$$$$$$$$$$$$$$$$$$$$ TODO FIX TAGS TESTS" + =begin it 'succeeds with no tags' do fill_in_valid