Sha256: f67e288ffe8d64f3f0bd219e6a5281df45eb2bbb7c0748a4b54fd5d90f446e1c

Contents?: true

Size: 1.11 KB

Versions: 11

Compression:

Stored size: 1.11 KB

Contents

require 'rails_helper'
require 'active_admin/batch_actions/views/batch_action_selector'

describe ActiveAdmin::BatchActions::BatchActionSelector do

  let(:dropdown) do
    render_arbre_component do
      batch_action_selector [
        ActiveAdmin::BatchAction.new(:action_1, "Action 1"),
        ActiveAdmin::BatchAction.new(:action_2, "Action 2"),
        ActiveAdmin::BatchAction.new(:action_3, "Action 3")
      ]
    end
  end

  describe "the action list" do
    subject do
      dropdown.find_by_class("dropdown_menu_list").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

11 entries across 11 versions & 3 rubygems

Version Path
activeadmin_addons-1.1.2 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/batch_action_selector_spec.rb
activeadmin_addons-1.1.1 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/batch_action_selector_spec.rb
activeadmin_addons-1.1.0 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/batch_action_selector_spec.rb
activeadmin_addons-1.0.1 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/batch_action_selector_spec.rb
activeadmin_addons-1.0.0 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/batch_action_selector_spec.rb
activeadmin-orac-1.0.0.pre4 spec/unit/views/components/batch_action_selector_spec.rb
activeadmin-orac-1.0.0 spec/unit/views/components/batch_action_selector_spec.rb
activeadmin-orac-1.0.0.pre.orac spec/unit/views/components/batch_action_selector_spec.rb
activeadmin-1.0.0.pre4 spec/unit/views/components/batch_action_selector_spec.rb
activeadmin-1.0.0.pre3 spec/unit/views/components/batch_action_selector_spec.rb
activeadmin-1.0.0.pre2 spec/unit/views/components/batch_action_selector_spec.rb