-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #122 from mamhoff/do-not-test-solidus-auth-devise
Do not rely on solidus_auth_devise for auth
- Loading branch information
Showing
2 changed files
with
6 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]') } | ||
|
@@ -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) | ||
|