Sha256: e526ff178cb1bb5bed2793be0a8c455826423210b6d87e30e37a332a618f4c00

Contents?: true

Size: 981 Bytes

Versions: 5

Compression:

Stored size: 981 Bytes

Contents

require 'spec_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

    its(:tag_name) { should eql("ul") }

    its(:content){ should include("class=\"batch_action\" data-action=\"action_1\"") }
    its(:content){ should include("class=\"batch_action\" data-action=\"action_2\"") }
    its(:content){ should include("class=\"batch_action\" data-action=\"action_3\"") }

  end

end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
active_administration-0.0.3 spec/unit/views/components/batch_action_popover_spec.rb
activeadministration-0.0.2 spec/unit/views/components/batch_action_popover_spec.rb
active_administration-0.0.2 spec/unit/views/components/batch_action_popover_spec.rb
activeadministration-0.0.1 spec/unit/views/components/batch_action_popover_spec.rb
active_administration-0.0.1 spec/unit/views/components/batch_action_popover_spec.rb