Sha256: c5e2b60b96a30e7c775bc6bc3f19ed29c05f0c527326556bc50142497413e6f8

Contents?: true

Size: 1.1 KB

Versions: 50

Compression:

Stored size: 1.1 KB

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
    the_popover.id.should == "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("<li><a href=\"#\" class=\"batch_action\" data-action=\"action_1\">Action 1 Selected</a></li>") }
    its(:content){ should include("<li><a href=\"#\" class=\"batch_action\" data-action=\"action_2\">Action 2 Selected</a></li>") }
    its(:content){ should include("<li><a href=\"#\" class=\"batch_action\" data-action=\"action_3\">Action 3 Selected</a></li>") }
    
  end

end

Version data entries

50 entries across 50 versions & 2 rubygems

Version Path
lalala-4.0.0.dev.141 vendor/deps/active_admin/spec/unit/views/components/batch_action_popover_spec.rb
lalala-4.0.0.dev.136 vendor/deps/active_admin/spec/unit/views/components/batch_action_popover_spec.rb
lalala-4.0.0.dev.135 vendor/deps/active_admin/spec/unit/views/components/batch_action_popover_spec.rb
lalala-4.0.0.dev.134 vendor/deps/active_admin/spec/unit/views/components/batch_action_popover_spec.rb
lalala-4.0.0.dev.133 vendor/deps/active_admin/spec/unit/views/components/batch_action_popover_spec.rb
lalala-4.0.0.dev.132 vendor/deps/active_admin/spec/unit/views/components/batch_action_popover_spec.rb
lalala-4.0.0.dev.131 vendor/deps/active_admin/spec/unit/views/components/batch_action_popover_spec.rb
lalala-4.0.0.dev.129 vendor/deps/active_admin/spec/unit/views/components/batch_action_popover_spec.rb
lalala-4.0.0.dev.128 vendor/deps/active_admin/spec/unit/views/components/batch_action_popover_spec.rb
lalala-4.0.0.dev.126 vendor/deps/active_admin/spec/unit/views/components/batch_action_popover_spec.rb
lalala-4.0.0.dev.125 vendor/deps/active_admin/spec/unit/views/components/batch_action_popover_spec.rb
lalala-4.0.0.dev.124 vendor/deps/active_admin/spec/unit/views/components/batch_action_popover_spec.rb
lalala-4.0.0.dev.123 vendor/deps/active_admin/spec/unit/views/components/batch_action_popover_spec.rb
lalala-4.0.0.dev.118 vendor/deps/active_admin/spec/unit/views/components/batch_action_popover_spec.rb
lalala-4.0.0.dev.116 vendor/deps/active_admin/spec/unit/views/components/batch_action_popover_spec.rb
lalala-4.0.0.dev.114 vendor/deps/active_admin/spec/unit/views/components/batch_action_popover_spec.rb
lalala-4.0.0.dev.113 vendor/deps/active_admin/spec/unit/views/components/batch_action_popover_spec.rb
lalala-4.0.0.dev.111 vendor/deps/active_admin/spec/unit/views/components/batch_action_popover_spec.rb
lalala-4.0.0.dev.109 vendor/deps/active_admin/spec/unit/views/components/batch_action_popover_spec.rb
lalala-4.0.0.dev.107 vendor/deps/active_admin/spec/unit/views/components/batch_action_popover_spec.rb