Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit d90ba56

Browse files
committed
Fix <p /> cannot be children of <p /> warning
1 parent d32a7e7 commit d90ba56

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

spec/react/component_spec.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -712,15 +712,16 @@ def render
712712
include React::Component
713713

714714
def render
715-
p(class_name: 'foo') do
715+
div {
716+
p(class_name: 'foo')
716717
p
717718
div { 'lorem ipsum' }
718719
p(id: '10')
719-
end
720+
}
720721
end
721722
end
722723

723-
markup = '<p class="foo"><p></p><div>lorem ipsum</div><p id="10"></p></p>'
724+
markup = '<div><p class="foo"></p><p></p><div>lorem ipsum</div><p id="10"></p></div>'
724725
expect(Foo).to render_static_html(markup)
725726
end
726727

0 commit comments

Comments
 (0)