]> git.openstreetmap.org Git - rails.git/commitdiff
Use the settings for the destination of the gpx fixture symlinks
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 27 Nov 2019 13:01:40 +0000 (14:01 +0100)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 18 Mar 2020 13:58:48 +0000 (14:58 +0100)
This lets us change the settings values and have the fixtures appear
in the right place.

test/factories/traces.rb

index 713a5be17ee9aa84fcd76c35de3ee486c5c64ae7..458faca83e4390ceb5e54f958c0cf0c6b6701602 100644 (file)
@@ -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"),
     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"),
         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"),
         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
       end
     end
   end