From: Andy Allan Date: Wed, 27 Nov 2019 13:01:40 +0000 (+0100) Subject: Use the settings for the destination of the gpx fixture symlinks X-Git-Tag: live~2210^2~4 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/8407c0dd98f98deb0327428817fe22acdf337a61 Use the settings for the destination of the gpx fixture symlinks This lets us change the settings values and have the fixtures appear in the right place. --- diff --git a/test/factories/traces.rb b/test/factories/traces.rb index 713a5be17..458faca83 100644 --- a/test/factories/traces.rb +++ b/test/factories/traces.rb @@ -20,11 +20,11 @@ FactoryBot.define do after(:create) do |trace, evaluator| if evaluator.fixture File.symlink(Rails.root.join("test", "gpx", "fixtures", "#{evaluator.fixture}.gpx"), - Rails.root.join("test", "gpx", "traces", "#{trace.id}.gpx")) + File.join(Settings.gpx_trace_dir, "#{trace.id}.gpx")) File.symlink(Rails.root.join("test", "gpx", "fixtures", "#{evaluator.fixture}.gif"), - Rails.root.join("test", "gpx", "images", "#{trace.id}.gif")) + File.join(Settings.gpx_image_dir, "#{trace.id}.gif")) File.symlink(Rails.root.join("test", "gpx", "fixtures", "#{evaluator.fixture}_icon.gif"), - Rails.root.join("test", "gpx", "images", "#{trace.id}_icon.gif")) + File.join(Settings.gpx_image_dir, "#{trace.id}_icon.gif")) end end end