]> git.openstreetmap.org Git - rails.git/blobdiff - test/models/tracetag_test.rb
Refactor remaining relation model tests to use factories.
[rails.git] / test / models / tracetag_test.rb
index a13d41e4a0f4876130e7a4cd6979891a652d8219..04263dbb74e905e3a65128fdb01409aaf3493564 100644 (file)
@@ -1,12 +1,6 @@
 require "test_helper"
 
 class TracetagTest < ActiveSupport::TestCase
-  api_fixtures
-
-  def test_tracetag_count
-    assert_equal 4, Tracetag.count
-  end
-
   def test_validations
     tracetag_valid({})
     tracetag_valid({ :tag => nil }, false)
@@ -24,7 +18,7 @@ class TracetagTest < ActiveSupport::TestCase
   private
 
   def tracetag_valid(attrs, result = true)
-    entry = Tracetag.new(gpx_file_tags(:first_trace_1).attributes)
+    entry = build(:tracetag)
     entry.assign_attributes(attrs)
     assert_equal result, entry.valid?, "Expected #{attrs.inspect} to be #{result}"
   end