when response is a file download, there is no need to check that it is well formed HTML (it's not, anyway)
This commit is contained in:
parent
c8e459cbb0
commit
685874da83
|
@ -102,12 +102,8 @@ if defined? $validate_xml_in_assert_success and $validate_xml_in_assert_success
|
||||||
alias :__assert_success_before_ovverride_by_instiki :assert_success
|
alias :__assert_success_before_ovverride_by_instiki :assert_success
|
||||||
def assert_success
|
def assert_success
|
||||||
__assert_success_before_ovverride_by_instiki
|
__assert_success_before_ovverride_by_instiki
|
||||||
if @response.body.kind_of?(Proc)
|
if @response.body.kind_of?(Proc) then # it's a file download, not an HTML content
|
||||||
body = @response.body.call
|
else assert_nothing_raised(@response.body) { REXML::Document.new(@response.body) } end
|
||||||
else
|
|
||||||
body = @response.body
|
|
||||||
end
|
|
||||||
assert_nothing_raised(body) { REXML::Document.new(body) }
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue