Sha256: 90e6e76bf44ad0db84b82ef677de68d58a3cf625299687b775c5ca561d69abb0

Contents?: true

Size: 826 Bytes

Versions: 119

Compression:

Stored size: 826 Bytes

Contents

describe AmaLayout::NavigationItem do
  let(:site_domain) { "http://waffleemporium.ca" }

  describe "#initialize" do
    it "returns a navigation item" do
      params = { text: "Gotham Overview", icon: "fa-tachometer", link: "#{site_domain}/gotica", alt: "Back to my dashboard", current_url: "#{site_domain}" }
      expect(AmaLayout::NavigationItem.new(params)).to be_a AmaLayout::NavigationItem
    end
  end

  describe "#sub_nav" do
    it "set the subnav" do
      subject.current_url = "#{site_domain}"
      items = [{ text: "Othersite Overview", link: "#{site_domain}/othersite"}]
      subject.sub_nav = items
      expect(subject.sub_nav).to be_an Array
      expect(subject.sub_nav.first.link).to include items.first[:link]
      expect(subject.sub_nav.first.text).to include items.first[:text]
    end
  end
end

Version data entries

119 entries across 119 versions & 1 rubygems

Version Path
ama_layout-11.5.1 spec/ama_layout/navigation_item_spec.rb
ama_layout-11.5.0 spec/ama_layout/navigation_item_spec.rb
ama_layout-11.4.0 spec/ama_layout/navigation_item_spec.rb
ama_layout-11.3.1 spec/ama_layout/navigation_item_spec.rb
ama_layout-11.3.0 spec/ama_layout/navigation_item_spec.rb
ama_layout-11.2.0 spec/ama_layout/navigation_item_spec.rb
ama_layout-11.1.0 spec/ama_layout/navigation_item_spec.rb
ama_layout-10.2.0 spec/ama_layout/navigation_item_spec.rb
ama_layout-10.1.0 spec/ama_layout/navigation_item_spec.rb
ama_layout-10.0.1 spec/ama_layout/navigation_item_spec.rb
ama_layout-9.5.3 spec/ama_layout/navigation_item_spec.rb
ama_layout-9.5.2 spec/ama_layout/navigation_item_spec.rb
ama_layout-9.5.1 spec/ama_layout/navigation_item_spec.rb
ama_layout-9.5.0 spec/ama_layout/navigation_item_spec.rb
ama_layout-9.4.1 spec/ama_layout/navigation_item_spec.rb
ama_layout-9.4.0 spec/ama_layout/navigation_item_spec.rb
ama_layout-9.3.0 spec/ama_layout/navigation_item_spec.rb
ama_layout-9.2.0 spec/ama_layout/navigation_item_spec.rb
ama_layout-9.1.0 spec/ama_layout/navigation_item_spec.rb
ama_layout-9.0.0 spec/ama_layout/navigation_item_spec.rb