From f94340b9e886a7aeda536ed8ee5841edd3f8e45a Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 9 Mar 2016 13:47:05 +0000 Subject: [PATCH 1/1] Fix tests that made assumptions about tag ordering --- test/controllers/trace_controller_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/controllers/trace_controller_test.rb b/test/controllers/trace_controller_test.rb index b2f7c01b0..2fec258af 100644 --- a/test/controllers/trace_controller_test.rb +++ b/test/controllers/trace_controller_test.rb @@ -491,7 +491,7 @@ class TraceControllerTest < ActionController::TestCase trace = Trace.order(:id => :desc).first assert_equal "1.gpx", trace.name assert_equal "New Trace", trace.description - assert_equal "new, trace", trace.tagstring + assert_equal %w(new trace), trace.tags.order(:tag).collect(&:tag) assert_equal "trackable", trace.visibility assert_equal false, trace.inserted assert_equal File.new(gpx_files(:public_trace_file).trace_name).read, File.new(trace.trace_name).read @@ -717,7 +717,7 @@ class TraceControllerTest < ActionController::TestCase trace = Trace.find(response.body.to_i) assert_equal "1.gpx", trace.name assert_equal "New Trace", trace.description - assert_equal "new, trace", trace.tagstring + assert_equal %w(new trace), trace.tags.order(:tag).collect(&:tag) assert_equal "trackable", trace.visibility assert_equal false, trace.inserted assert_equal File.new(gpx_files(:public_trace_file).trace_name).read, File.new(trace.trace_name).read @@ -735,7 +735,7 @@ class TraceControllerTest < ActionController::TestCase trace = Trace.find(response.body.to_i) assert_equal "1.gpx", trace.name assert_equal "New Trace", trace.description - assert_equal "new, trace", trace.tagstring + assert_equal %w(new trace), trace.tags.order(:tag).collect(&:tag) assert_equal "public", trace.visibility assert_equal false, trace.inserted assert_equal File.new(gpx_files(:public_trace_file).trace_name).read, File.new(trace.trace_name).read @@ -753,7 +753,7 @@ class TraceControllerTest < ActionController::TestCase trace = Trace.find(response.body.to_i) assert_equal "1.gpx", trace.name assert_equal "New Trace", trace.description - assert_equal "new, trace", trace.tagstring + assert_equal %w(new trace), trace.tags.order(:tag).collect(&:tag) assert_equal "private", trace.visibility assert_equal false, trace.inserted assert_equal File.new(gpx_files(:public_trace_file).trace_name).read, File.new(trace.trace_name).read -- 2.43.2