Sha256: 7e506fe9e439b6b53904136ec3f2a1404924096ca9f0a48ade4b596687f764a9

Contents?: true

Size: 1.12 KB

Versions: 19

Compression:

Stored size: 1.12 KB

Contents

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

RSpec.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

19 entries across 19 versions & 3 rubygems

Version Path
activeadmin-rb-1.6.0 spec/unit/views/components/batch_action_selector_spec.rb
activeadmin-rb-1.5.2 spec/unit/views/components/batch_action_selector_spec.rb
activeadmin-rb-1.5.1 spec/unit/views/components/batch_action_selector_spec.rb
activeadmin-rb-1.5.0 spec/unit/views/components/batch_action_selector_spec.rb
activeadmin_addons-1.7.1 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/spec/unit/views/components/batch_action_selector_spec.rb
activeadmin-rb-1.4.0 spec/unit/views/components/batch_action_selector_spec.rb
activeadmin_addons-1.7.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/spec/unit/views/components/batch_action_selector_spec.rb
activeadmin-1.3.1 spec/unit/views/components/batch_action_selector_spec.rb
activeadmin_addons-1.6.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/spec/unit/views/components/batch_action_selector_spec.rb
activeadmin_addons-1.5.0 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-f71b375325eb/spec/unit/views/components/batch_action_selector_spec.rb
activeadmin-1.3.0 spec/unit/views/components/batch_action_selector_spec.rb
activeadmin_addons-1.4.0 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-f71b375325eb/spec/unit/views/components/batch_action_selector_spec.rb
activeadmin_addons-1.3.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/spec/unit/views/components/batch_action_selector_spec.rb
activeadmin_addons-1.2.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/spec/unit/views/components/batch_action_selector_spec.rb
activeadmin-1.2.1 spec/unit/views/components/batch_action_selector_spec.rb
activeadmin-1.2.0 spec/unit/views/components/batch_action_selector_spec.rb
activeadmin-1.1.0 spec/unit/views/components/batch_action_selector_spec.rb
activeadmin-1.0.0 spec/unit/views/components/batch_action_selector_spec.rb
activeadmin-1.0.0.pre5 spec/unit/views/components/batch_action_selector_spec.rb