Sha256: 39053f8698023637a4e7e08bf7ce5c2a7770ffac01f41af4c18e3878e632a01c

Contents?: true

Size: 786 Bytes

Versions: 5

Compression:

Stored size: 786 Bytes

Contents

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

    its(:tag_name) { should eql("ul") }
    its(:content){ should include("<li><a href=\"#\">My First Great Action</a></li>") }
    its(:content){ should include("<li><a href=\"http://www.google.com\">My Second Great Action</a></li>") }

  end

end

Version data entries

5 entries across 5 versions & 2 rubygems

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