Drop test

This commit is contained in:
Daniel O'Connor committed 2022-12-10 15:55:57 +10:30
1 parent 07feb1cd85
commit 28d550d67f
2 files changed
-28

No files matched your search

-4
View File
@@ -233,8 +233,4 @@ Devise.setup do |config|
# When using omniauth, Devise cannot automatically set Omniauth path,
# so you need to do it manually. For the users scope, it would be:
# config.omniauth_path_prefix = "/my_engine/users/auth"
# Later we may wish to ask for user_photos,user_location, however this means we need to be reviewed by facebook
config.omniauth :facebook, ENV['GROWSTUFF_FACEBOOK_KEY'], ENV['GROWSTUFF_FACEBOOK_SECRET'], scope: 'email,public_profile',
display: 'page', info_fields: 'email,name,first_name,last_name,id'
end
-24
View File
@@ -82,28 +82,4 @@ describe "signin", js: true do
click_button 'Sign in'
expect(page).to have_content("There are crops waiting to be wrangled.")
end
context "with facebook" do
it "sign in" do
# Ordinarily done by database_cleaner
Member.where(login_name: 'tdawg').delete_all
create(:member, login_name: 'tdawg', email: 'example.oauth.facebook@example.com')
# Start the test
visit root_path
first('.signup a').click
# Click the signup with facebook link
first('a[href="/members/auth/facebook"]').click
# Magic happens!
# See config/environments/test.rb for the fake user
# that we pretended to auth as
# Signed up and logged in
expect(page).to have_current_path root_path, ignore_query: true
expect(page.text).to include("Welcome to #{ENV['GROWSTUFF_SITE_NAME']}, tdawg")
end
end
end