mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
Update assert_select for Nokogiri compatibility
assert_select has been moved into the rails-dom-testing gem and is now based on Nokogiri. * Remove assert_tag and assert_xml_select * Quote CSS attribute selector values * Use decoded versions of HTML in assert_select. Nokogiri decodes elements prior to matching. * Add a test helper for entities such as ` ` for which it's difficult or confusing to include the decoded version directly in the assertion. * Assert directly on Atom feeds' XML namespace because it isn't selectable as an attribute
This commit is contained in:
parent
d7d86446c0
commit
689db4c9c3
9 changed files with 66 additions and 64 deletions
|
|
@ -6,11 +6,12 @@ class ProjectXmlApiTest < ActionDispatch::IntegrationTest
|
|||
|
||||
def test_retrieve_project
|
||||
authenticated_get_xml "/projects/1.xml", users(:admin_user).login, 'abracadabra', {}
|
||||
assert_tag :tag => "project"
|
||||
assert_tag :tag => "project", :child => {:tag => "not_done" }
|
||||
assert_tag :tag => "project", :child => {:tag => "deferred" }
|
||||
assert_tag :tag => "project", :child => {:tag => "pending" }
|
||||
assert_tag :tag => "project", :child => {:tag => "done" }
|
||||
assert_select 'project' do
|
||||
assert_select 'not_done'
|
||||
assert_select 'deferred'
|
||||
assert_select 'pending'
|
||||
assert_select 'done'
|
||||
end
|
||||
assert_response 200
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue