Sha256: 034fecff872f4692c458c85c841e9754c28026815947fc74366b8b6e918a35fc

Contents?: true

Size: 990 Bytes

Versions: 25

Compression:

Stored size: 990 Bytes

Contents

require 'rails_helper'

describe ActiveAdmin::Views::Tabs do
  describe "creating with the dsl" do
    context "when creating tabs with a symbol" do
      let(:tabs) do
        render_arbre_component do
          tabs do
            tab :overview
          end
        end
      end

      it "should create a tab navigation bar based on the symbol" do
        expect(tabs.find_by_tag('li').first.content).to include "Overview"
      end
    end

    context "when creating a tab with a block" do
      let(:tabs) do
        render_arbre_component do
          tabs do
            tab :overview do
              span 'tab 1'
            end
          end
        end
      end

      it "should create a tab navigation bar based on the symbol" do
        expect(tabs.find_by_tag('li').first.content).to include "Overview"
      end

      it "should create a tab with a span inside of it" do
        expect(tabs.find_by_tag('span').first.content).to eq('tab 1')
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 4 rubygems

Version Path
activeadmin_addons-1.1.2 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/tabs_spec.rb
activeadmin_addons-1.1.1 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/tabs_spec.rb
yousty-activeadmin-1.0.17.pre spec/unit/views/components/tabs_spec.rb
yousty-activeadmin-1.0.16.pre spec/unit/views/components/tabs_spec.rb
activeadmin_addons-1.1.0 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/tabs_spec.rb
activeadmin_addons-1.0.1 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/tabs_spec.rb
activeadmin_addons-1.0.0 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/tabs_spec.rb
yousty-activeadmin-1.0.15.pre spec/unit/views/components/tabs_spec.rb
activeadmin-orac-1.0.0.pre4 spec/unit/views/components/tabs_spec.rb
activeadmin-orac-1.0.0 spec/unit/views/components/tabs_spec.rb
activeadmin-orac-1.0.0.pre.orac spec/unit/views/components/tabs_spec.rb
yousty-activeadmin-1.0.14.pre spec/unit/views/components/tabs_spec.rb
yousty-activeadmin-1.0.13.pre spec/unit/views/components/tabs_spec.rb
yousty-activeadmin-1.0.12.pre spec/unit/views/components/tabs_spec.rb
yousty-activeadmin-1.0.11.pre spec/unit/views/components/tabs_spec.rb
yousty-activeadmin-1.0.10.pre spec/unit/views/components/tabs_spec.rb
yousty-activeadmin-1.0.9.pre spec/unit/views/components/tabs_spec.rb
yousty-activeadmin-1.0.8.pre spec/unit/views/components/tabs_spec.rb
activeadmin-1.0.0.pre4 spec/unit/views/components/tabs_spec.rb
activeadmin-1.0.0.pre3 spec/unit/views/components/tabs_spec.rb