spec/unit/views/components/attributes_table_spec.rb in activeadmin-0.5.1 vs spec/unit/views/components/attributes_table_spec.rb in activeadmin-0.6.0
- old
+ new
@@ -88,9 +88,20 @@
end # describe rendering rows
end
end # describe dsl styles
+ it "should allow html options for the row itself" do
+ table = render_arbre_component(assigns) {
+ attributes_table_for(post) do
+ row("Wee", :class => "custom_row", :style => "custom_style") { }
+ end
+ }
+ table.find_by_tag("tr").first.to_s.
+ split("\n").first.lstrip.
+ should == '<tr class="custom_row" style="custom_style">'
+ end
+
it "should allow html content inside the attributes table" do
table = render_arbre_component(assigns) {
attributes_table_for(post) do
row("ID"){ span(post.id, :class => 'id') }
end