Sha256: 3c76deb54fea15a5fb045c92652f6cbdd0f48c490856a8280055bfeffa2729cd

Contents?: true

Size: 994 Bytes

Versions: 14

Compression:

Stored size: 994 Bytes

Contents

require 'rails_helper'

describe ActiveAdmin::Views::ActionListPopover do

  let(:the_popover) do
    arbre {
      action_list_popover id: "my_awesome_action_list_popover" do
        action "My First Great Action", "#"
        action "My Second Great Action", "http://www.google.com"
      end
    }.children.first
  end

  it "should have an id" do
    expect(the_popover.id).to eq "my_awesome_action_list_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("<li><a href=\"#\">My First Great Action</a></li>") }
    end

    describe '#content' do
      subject { super().content }
      it{ is_expected.to include("<li><a href=\"http://www.google.com\">My Second Great Action</a></li>") }
    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/action_list_popover_spec.rb
yousty-activeadmin-1.0.16.pre spec/unit/views/components/action_list_popover_spec.rb
yousty-activeadmin-1.0.15.pre spec/unit/views/components/action_list_popover_spec.rb
yousty-activeadmin-1.0.14.pre spec/unit/views/components/action_list_popover_spec.rb
yousty-activeadmin-1.0.13.pre spec/unit/views/components/action_list_popover_spec.rb
yousty-activeadmin-1.0.12.pre spec/unit/views/components/action_list_popover_spec.rb
yousty-activeadmin-1.0.11.pre spec/unit/views/components/action_list_popover_spec.rb
yousty-activeadmin-1.0.10.pre spec/unit/views/components/action_list_popover_spec.rb
yousty-activeadmin-1.0.9.pre spec/unit/views/components/action_list_popover_spec.rb
yousty-activeadmin-1.0.8.pre spec/unit/views/components/action_list_popover_spec.rb
activeadmin-1.0.0.pre1 spec/unit/views/components/action_list_popover_spec.rb
yousty-activeadmin-1.0.7.pre spec/unit/views/components/action_list_popover_spec.rb
yousty-activeadmin-1.0.6.pre spec/unit/views/components/action_list_popover_spec.rb
yousty-activeadmin-1.0.5.pre spec/unit/views/components/action_list_popover_spec.rb