1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Use regexp instead exact match for atom test

There are two xml namespaces in the response body and the xhtml
namespace is not registered in the root node. This create an invalid XML
and nokogiri can't navigate using xpath on that node.
This commit is contained in:
Rafael Mendonça França 2014-07-15 14:42:36 -03:00
parent f5426315d9
commit 82e478836f

View file

@ -315,12 +315,11 @@ class AtomFeedTest < ActionController::TestCase
end
def test_feed_xhtml
skip "Pending. There are two xml namespaces in the response body, as such Nokogiri doesn't know which one to pick and can't find the elements."
with_restful_routing(:scrolls) do
get :index, :id => "feed_with_xhtml_content"
assert_match %r{xmlns="http://www.w3.org/1999/xhtml"}, @response.body
assert_select "summary div p", :text => "Something Boring"
assert_select "summary div p", :text => "after 2"
assert_select "summary", :text => /Something Boring/
assert_select "summary", :text => /after 2/
end
end