From 8407c0dd98f98deb0327428817fe22acdf337a61 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 27 Nov 2019 14:01:40 +0100 Subject: [PATCH] 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. --- test/factories/traces.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.43.2