Replace trace-related fixtures with factories.

The mocking and stubbing in the controller tests is
unfortunate, but the models interact directly with the filesystem
using the trace id so that's hard to control any other way.
This commit is contained in:
Andy Allan 2016-10-29 16:21:52 +02:00
parent f7b4793c50
commit 15689af6bf
17 changed files with 543 additions and 536 deletions

16
test/factories/traces.rb Normal file
View file

@ -0,0 +1,16 @@
FactoryGirl.define do
factory :trace do
sequence(:name) { |n| "Trace #{n}.gpx" }
sequence(:description) { |n| "This is trace #{n}" }
# Fixme requires User Factory
user_id 1
timestamp Time.now
inserted true
trait :deleted do
visible false
end
end
end