Sha256: 3ae86d83e35d6b4457e1d12200b68c9054daa39e86ddb7bd2bf98855597ff35e

Contents?: true

Size: 1.23 KB

Versions: 14

Compression:

Stored size: 1.23 KB

Contents

require 'rails_helper'
require 'active_admin/batch_actions/views/batch_action_popover'

describe ActiveAdmin::BatchActions::BatchActionPopover do

  let(:the_popover) do
    render_arbre_component do
      batch_action_popover do
        action ActiveAdmin::BatchAction.new( :action_1, "Action 1" )
        action ActiveAdmin::BatchAction.new( :action_2, "Action 2" )
        action ActiveAdmin::BatchAction.new( :action_3, "Action 3" )
      end
    end
  end

  it "should have an id" do
    expect(the_popover.id).to eq "batch_actions_popover"
  end

  describe "the action list" do
    subject do
      the_popover.find_by_class("popover_contents").first
    end

    describe '#tag_name' do
      subject { super().tag_name }
      it { is_expected.to eql("ul") }
    end

    describe '#content' do
      subject { super().content }
      it{ is_expected.to include("class=\"batch_action\" data-action=\"action_1\"") }
    end

    describe '#content' do
      subject { super().content }
      it{ is_expected.to include("class=\"batch_action\" data-action=\"action_2\"") }
    end

    describe '#content' do
      subject { super().content }
      it{ is_expected.to include("class=\"batch_action\" data-action=\"action_3\"") }
    end

  end

end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
yousty-activeadmin-1.0.17.pre spec/unit/views/components/batch_action_popover_spec.rb
yousty-activeadmin-1.0.16.pre spec/unit/views/components/batch_action_popover_spec.rb
yousty-activeadmin-1.0.15.pre spec/unit/views/components/batch_action_popover_spec.rb
yousty-activeadmin-1.0.14.pre spec/unit/views/components/batch_action_popover_spec.rb
yousty-activeadmin-1.0.13.pre spec/unit/views/components/batch_action_popover_spec.rb
yousty-activeadmin-1.0.12.pre spec/unit/views/components/batch_action_popover_spec.rb
yousty-activeadmin-1.0.11.pre spec/unit/views/components/batch_action_popover_spec.rb
yousty-activeadmin-1.0.10.pre spec/unit/views/components/batch_action_popover_spec.rb
yousty-activeadmin-1.0.9.pre spec/unit/views/components/batch_action_popover_spec.rb
yousty-activeadmin-1.0.8.pre spec/unit/views/components/batch_action_popover_spec.rb
activeadmin-1.0.0.pre1 spec/unit/views/components/batch_action_popover_spec.rb
yousty-activeadmin-1.0.7.pre spec/unit/views/components/batch_action_popover_spec.rb
yousty-activeadmin-1.0.6.pre spec/unit/views/components/batch_action_popover_spec.rb
yousty-activeadmin-1.0.5.pre spec/unit/views/components/batch_action_popover_spec.rb