Sha256: 8dd012e7cd31d4f88a13a14d3437a4e9632dae2f18a22bbe4b6ce9c32f159ca5
Contents?: true
Size: 921 Bytes
Versions: 25
Compression:
Stored size: 921 Bytes
Contents
require 'rails_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 allow(helpers).to receive(:url_for).and_return("/") allow(helpers).to receive(: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 describe '#tag_name' do subject { super().tag_name } it { is_expected.to eq 'ul'} end it "should contain the names of available indexes in links" do a_tags = subject.find_by_tag("a") expect(a_tags.size).to eq 2 expect(a_tags.first.to_s).to include("Table") expect(a_tags.last.to_s).to include("List") end end end
Version data entries
25 entries across 25 versions & 4 rubygems