From 28d550d67f5fb0d088ed1e39398f06009c4d7aa4 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Sat, 10 Dec 2022 15:55:57 +1030 Subject: [PATCH] Drop test --- config/initializers/devise.rb | 4 ---- spec/features/signin_spec.rb | 24 ------------------------ 2 files changed, 28 deletions(-) diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 9e5b06c66..4990573d1 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -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 diff --git a/spec/features/signin_spec.rb b/spec/features/signin_spec.rb index 6ea441989..aa9082bd3 100644 --- a/spec/features/signin_spec.rb +++ b/spec/features/signin_spec.rb @@ -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