Skip to content

Commit

Permalink
Do not rely on solidus_auth_devise for auth
Browse files Browse the repository at this point in the history
We don't need to be testing whether the login page works for this gem.
  • Loading branch information
mamhoff committed Dec 3, 2024
1 parent 215ad02 commit 248bad8
Show file tree
Hide file tree
Showing 2 changed files with 3 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
9 changes: 3 additions & 6 deletions spec/features/reviews_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,9 @@
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'
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
end

def click_star(num)
Expand Down

0 comments on commit 248bad8

Please sign in to comment.