Sha256: ec9ab6e7fe1f273702e800c5e7a364932a57fff7d749dfc06cd6a426dee11f30

Contents?: true

Size: 895 Bytes

Versions: 62

Compression:

Stored size: 895 Bytes

Contents

require 'spec_helper'

describe ActiveAdmin::Views::SidebarSection do

  let(:section) do
    ActiveAdmin::SidebarSection.new("Help Section") do
      span "Help Me"
    end
  end

  let(:html) do
    render_arbre_component :section => section do
      sidebar_section(assigns[:section])
    end
  end

  it "should have a title h3" do
    html.find_by_tag("h3").first.content.should == "Help Section"
  end

  it "should have the class of 'sidebar_section'" do
    html.class_list.should include("sidebar_section")
  end

  it "should have an id based on the title" do
    html.id.should == "help-section_sidebar_section"
  end

  it "should have a contents div" do
    html.find_by_tag("div").first.class_list.should include("panel_contents")
  end

  it "should add children to the contents div" do
    html.find_by_tag("span").first.parent.should == html.find_by_tag("div").first
  end

end

Version data entries

62 entries across 62 versions & 4 rubygems

Version Path
activeadmin-0.6.6 spec/unit/views/components/sidebar_section_spec.rb
activeadmin-0.6.5 spec/unit/views/components/sidebar_section_spec.rb
activeadmin-0.6.4 spec/unit/views/components/sidebar_section_spec.rb
yousty-activeadmin-1.0.4.pre spec/unit/views/components/sidebar_section_spec.rb
yousty-activeadmin-1.0.3.pre spec/unit/views/components/sidebar_section_spec.rb
yousty-activeadmin-1.0.2.pre spec/unit/views/components/sidebar_section_spec.rb
activeadmin-0.6.3 spec/unit/views/components/sidebar_section_spec.rb
yousty-activeadmin-1.0.1.pre spec/unit/views/components/sidebar_section_spec.rb
yousty-activeadmin-1.0.0.pre spec/unit/views/components/sidebar_section_spec.rb
activeadmin-0.6.2 spec/unit/views/components/sidebar_section_spec.rb
activeadmin-0.6.1 spec/unit/views/components/sidebar_section_spec.rb
aa-rails4-0.6.0 spec/unit/views/components/sidebar_section_spec.rb
lalala-4.0.0.dev.141 vendor/deps/active_admin/spec/unit/views/components/sidebar_section_spec.rb
lalala-4.0.0.dev.136 vendor/deps/active_admin/spec/unit/views/components/sidebar_section_spec.rb
lalala-4.0.0.dev.135 vendor/deps/active_admin/spec/unit/views/components/sidebar_section_spec.rb
lalala-4.0.0.dev.134 vendor/deps/active_admin/spec/unit/views/components/sidebar_section_spec.rb
lalala-4.0.0.dev.133 vendor/deps/active_admin/spec/unit/views/components/sidebar_section_spec.rb
lalala-4.0.0.dev.132 vendor/deps/active_admin/spec/unit/views/components/sidebar_section_spec.rb
lalala-4.0.0.dev.131 vendor/deps/active_admin/spec/unit/views/components/sidebar_section_spec.rb
lalala-4.0.0.dev.129 vendor/deps/active_admin/spec/unit/views/components/sidebar_section_spec.rb