lib/spree/api/testing_support/helpers.rb in solidus_api-2.11.0 vs lib/spree/api/testing_support/helpers.rb in solidus_api-2.11.1
- old
+ new
@@ -32,10 +32,19 @@
def current_api_user
@current_api_user ||= stub_model(Spree::LegacyUser, email: "spree@example.com", spree_roles: [])
end
def image(filename)
- File.open(Spree::Api::Engine.root + "spec/fixtures" + filename)
+ File.open(
+ File.join(
+ Spree::Core::Engine.root,
+ "lib",
+ "spree",
+ "testing_support",
+ "fixtures",
+ filename
+ )
+ )
end
def upload_image(filename)
Rack::Test::UploadedFile.new(File.open(image(filename).path), 'image/jpg')
end