mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Result of rubocop auto-correct and rebuilding rubocop_manual_todo
This commit is contained in:
@@ -2,6 +2,6 @@ require 'spree/api/testing_support/helpers'
|
||||
|
||||
Spree::Api::TestingSupport::Helpers.class_eval do
|
||||
def current_api_user
|
||||
@current_api_user ||= Spree::LegacyUser.new(:email => "spree@example.com", :enterprises => [])
|
||||
@current_api_user ||= Spree::LegacyUser.new(email: "spree@example.com", enterprises: [])
|
||||
end
|
||||
end
|
||||
|
||||
@@ -4,7 +4,7 @@ module Spree
|
||||
module Setup
|
||||
def sign_in_as_user!
|
||||
let!(:current_api_user) do
|
||||
user = Spree::LegacyUser.new(:email => "spree@example.com")
|
||||
user = Spree::LegacyUser.new(email: "spree@example.com")
|
||||
user.stub(:has_spree_role?).with("admin").and_return(false)
|
||||
user.stub(:enterprises) { [] }
|
||||
user.stub(:owned_groups) { [] }
|
||||
@@ -31,7 +31,7 @@ module Spree
|
||||
|
||||
def sign_in_as_admin!
|
||||
let!(:current_api_user) do
|
||||
user = Spree::LegacyUser.new(:email => "spree@example.com")
|
||||
user = Spree::LegacyUser.new(email: "spree@example.com")
|
||||
user.stub(:has_spree_role?).with("admin").and_return(true)
|
||||
|
||||
# Stub enterprises, needed for cancan ability checks
|
||||
|
||||
Reference in New Issue
Block a user