]> git.openstreetmap.org Git - rails.git/blobdiff - test/models/way_test.rb
fix and improve ability coverage to account for tokens
[rails.git] / test / models / way_test.rb
index ed8a6cea3e794981d23272fe5da060a646f0539c..6abf99c575948824cc5cfd38abd674dbbb6ae8ae 100644 (file)
@@ -1,14 +1,6 @@
 require "test_helper"
 
 class WayTest < ActiveSupport::TestCase
-  api_fixtures
-
-  # Check that we have the correct number of currnet ways in the db
-  # This will need to updated whenever the current_ways.yml is updated
-  def test_db_count
-    assert_equal 7, Way.count
-  end
-
   def test_bbox
     node = create(:node)
     visible_way = create(:way)
@@ -50,7 +42,7 @@ class WayTest < ActiveSupport::TestCase
 
   def test_from_xml_no_id
     noid = "<osm><way version='12' changeset='23' /></osm>"
-    assert_nothing_raised(OSM::APIBadXMLError) do
+    assert_nothing_raised do
       Way.from_xml(noid, true)
     end
     message = assert_raise(OSM::APIBadXMLError) do
@@ -73,7 +65,7 @@ class WayTest < ActiveSupport::TestCase
 
   def test_from_xml_no_version
     no_version = "<osm><way id='123' changeset='23' /></osm>"
-    assert_nothing_raised(OSM::APIBadXMLError) do
+    assert_nothing_raised do
       Way.from_xml(no_version, true)
     end
     message_update = assert_raise(OSM::APIBadXMLError) do
@@ -86,7 +78,7 @@ class WayTest < ActiveSupport::TestCase
     id_list = ["", "0", "00", "0.0", "a"]
     id_list.each do |id|
       zero_id = "<osm><way id='#{id}' changeset='33' version='23' /></osm>"
-      assert_nothing_raised(OSM::APIBadUserInput) do
+      assert_nothing_raised do
         Way.from_xml(zero_id, true)
       end
       message_update = assert_raise(OSM::APIBadUserInput) do