change spec to use new authentication helper and user factory

This commit is contained in:
Eduardo
2020-09-04 08:48:16 -03:00
parent 07e5f8ed8d
commit 71876ca23a

View File

@@ -1,7 +1,7 @@
require "spec_helper"
describe "spree/admin/payment_methods/index.html.haml" do
include AuthenticationWorkflow
include AuthenticationHelper
before do
controller.singleton_class.class_eval do
@@ -23,7 +23,7 @@ describe "spree/admin/payment_methods/index.html.haml" do
describe "payment methods index page" do
context "when user is not admin" do
before do
allow(view).to receive_messages spree_current_user: create_enterprise_user
allow(view).to receive_messages spree_current_user: create(:user)
end
it "shows only the providers of the existing payment methods" do