X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/c51786d10bc6dda488964f468a6a3071dd6912a8..0ff89c31e4f8a0c3fc31772c4cf914c4fd7f5656:/test/models/user_test.rb diff --git a/test/models/user_test.rb b/test/models/user_test.rb index 330f40df2..de318df20 100644 --- a/test/models/user_test.rb +++ b/test/models/user_test.rb @@ -151,8 +151,8 @@ class UserTest < ActiveSupport::TestCase def test_user_preferred_editor user = create(:user) assert_nil user.preferred_editor - user.preferred_editor = "potlatch" - assert_equal "potlatch", user.preferred_editor + user.preferred_editor = "id" + assert_equal "id", user.preferred_editor user.save! user.preferred_editor = "invalid_editor" @@ -268,24 +268,4 @@ class UserTest < ActiveSupport::TestCase assert_not user.visible? assert_not user.active? end - - def test_to_xml - user = build(:user, :with_home_location) - xml = user.to_xml - assert_select Nokogiri::XML::Document.parse(xml.to_s), "user" do - assert_select "[display_name=?]", user.display_name - assert_select "[account_created=?]", user.creation_time.xmlschema - assert_select "home[lat=?][lon=?][zoom=?]", user.home_lat.to_s, user.home_lon.to_s, user.home_zoom.to_s - end - end - - def test_to_xml_node - user = build(:user, :with_home_location) - xml = user.to_xml_node - assert_select Nokogiri::XML::DocumentFragment.parse(xml.to_s), "user" do - assert_select "[display_name=?]", user.display_name - assert_select "[account_created=?]", user.creation_time.xmlschema - assert_select "home[lat=?][lon=?][zoom=?]", user.home_lat.to_s, user.home_lon.to_s, user.home_zoom.to_s - end - end end