From 30fad228c5f3e692d88bb0dc29dbf63ba9162688 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Tue, 7 Aug 2018 09:24:31 +1000 Subject: [PATCH] Remove code duplication in spec helper --- spec/support/request/authentication_workflow.rb | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/spec/support/request/authentication_workflow.rb b/spec/support/request/authentication_workflow.rb index 61ba32e1b0..5d3181ea4f 100644 --- a/spec/support/request/authentication_workflow.rb +++ b/spec/support/request/authentication_workflow.rb @@ -20,16 +20,7 @@ module AuthenticationWorkflow end def login_to_admin_section - admin_role = Spree::Role.find_or_create_by_name!('admin') - admin_user = create(:user, - :password => 'passw0rd', - :password_confirmation => 'passw0rd', - :remember_me => false, - :persistence_token => 'pass', - :login => 'admin@ofn.org') - - admin_user.spree_roles << admin_role - quick_login_as admin_user + quick_login_as_admin visit spree.admin_path end