Sha256: 7e2c3cde2e435aa74e1e5a08ede427d9ee64e553b21840bd7bc70ab4184e193c
Contents?: true
Size: 820 Bytes
Versions: 1
Compression:
Stored size: 820 Bytes
Contents
require 'spec_helper' describe ActiveAdmin::Views::IndexList do describe "#index_list_renderer" do let(:index_classes) { [ActiveAdmin::Views::IndexAsTable, ActiveAdmin::Views::IndexAsBlock] } let(:helpers) do helpers = mock_action_view helpers.stub! :url_for => "/" helpers.stub!(:params).and_return({:as => "table"}) helpers end subject do render_arbre_component({:index_classes => index_classes}, helpers) do index_list_renderer(index_classes) end end its(:tag_name) { should == 'ul' } it "should contain the names of available indexes in links" do a_tags = subject.find_by_tag("a") a_tags.size.should == 2 a_tags.first.to_s.should include("Table") a_tags.last.to_s.should include("List") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
activeadmin-0.6.0 | spec/unit/views/components/index_list_spec.rb |