Adding quick login, more test refactoring

This commit is contained in:
Will Marshall
2014-05-01 17:11:56 +10:00
parent 6ad30d901d
commit 59d2bc908e
5 changed files with 139 additions and 168 deletions

View File

@@ -1,4 +1,8 @@
module AuthenticationWorkflow
def quick_login_as(user)
ApplicationController.any_instance.stub(:spree_current_user).and_return user
end
def login_to_admin_section
admin_role = Spree::Role.find_or_create_by_name!('admin')
admin_user = create(:user,