+ assert_equal(-1, returned_way[0])
+ assert returned_way[3].nil?
+ assert returned_way[4].nil?
+ assert returned_way[5].nil?
+ end
+ end
+
+ def test_getway_old_invisible
+ way = create(:way, :deleted, :with_history, :version => 1)
+ v1 = way.old_ways.find_by(:version => 1)
+ # try to get deleted version
+ [[v1.way_id, (v1.timestamp + 10).strftime("%d %b %Y, %H:%M:%S")]].each do |id, t|
+ post :amf_read, :body => amf_content("getway_old", "/1", [id, t])
+ assert_response :success
+ amf_parse_response
+ returned_way = amf_result("/1")
+ assert_equal(-1, returned_way[0])