提交 ba4a6c29 编写于 作者: C Carlos Antonio da Silva

Fix AR tests due to builder change with nil values / empty strings

Check 0180e090 for more reasoning about
that.
上级 29fe0657
......@@ -185,18 +185,18 @@ def setup
end
def test_should_serialize_string
assert_match %r{<name nil="true"></name>}, @xml
assert_match %r{<name nil="true"/>}, @xml
end
def test_should_serialize_integer
assert %r{<age (.*)></age>}.match(@xml)
assert %r{<age (.*)/>}.match(@xml)
attributes = $1
assert_match %r{nil="true"}, attributes
assert_match %r{type="integer"}, attributes
end
def test_should_serialize_binary
assert %r{<avatar (.*)></avatar>}.match(@xml)
assert %r{<avatar (.*)/>}.match(@xml)
attributes = $1
assert_match %r{type="binary"}, attributes
assert_match %r{encoding="base64"}, attributes
......@@ -204,21 +204,21 @@ def test_should_serialize_binary
end
def test_should_serialize_datetime
assert %r{<created-at (.*)></created-at>}.match(@xml)
assert %r{<created-at (.*)/>}.match(@xml)
attributes = $1
assert_match %r{nil="true"}, attributes
assert_match %r{type="dateTime"}, attributes
end
def test_should_serialize_boolean
assert %r{<awesome (.*)></awesome>}.match(@xml)
assert %r{<awesome (.*)/>}.match(@xml)
attributes = $1
assert_match %r{type="boolean"}, attributes
assert_match %r{nil="true"}, attributes
end
def test_should_serialize_yaml
assert_match %r{<preferences nil=\"true\"></preferences>}, @xml
assert_match %r{<preferences nil=\"true\"/>}, @xml
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册