Skip to content

Commit

Permalink
Merge pull request #122 from mamhoff/do-not-test-solidus-auth-devise
Browse files Browse the repository at this point in the history
Do not rely on solidus_auth_devise for auth
  • Loading branch information
tvdeyen authored Jan 6, 2025
2 parents 215ad02 + 78b9d87 commit 34522f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
3 changes: 0 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ end
# See https://github.com/bundler/bundler/issues/6677
gem 'rails', '>0.a'

# Provides basic authentication functionality for testing parts of your engine
gem 'solidus_auth_devise'

case ENV.fetch('DB', nil)
when 'mysql'
gem 'mysql2'
Expand Down
12 changes: 6 additions & 6 deletions spec/features/reviews_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# frozen_string_literal: true

require 'spec_helper'
require 'spree/testing_support/authorization_helpers'

describe 'Reviews', js: true do
let!(:someone) { create(:user, email: '[email protected]') }
Expand Down Expand Up @@ -125,12 +126,11 @@
private

def sign_in_as!(user)
visit spree.login_path
within '#new_spree_user' do
fill_in 'Email', with: user.email
fill_in 'Password', with: user.password
end
click_button 'Login'
# rubocop:disable RSpec/AnyInstance
allow_any_instance_of(ApplicationController).to receive_messages current_user: user
allow_any_instance_of(ApplicationController).to receive_messages spree_current_user: user
allow_any_instance_of(ApplicationController).to receive_messages spree_user_signed_in?: true
# rubocop:enable RSpec/AnyInstance
end

def click_star(num)
Expand Down

0 comments on commit 34522f1

Please sign in to comment.