Sha256: faae9eb8a39038b67246c5a1cbab6469cd5b758df3107aee5d843169ece2135f

Contents?: true

Size: 635 Bytes

Versions: 1

Compression:

Stored size: 635 Bytes

Contents

require "spec_helper"
     
describe "AdminFu menus" do
  
  before :each do   
    AdminFu.clear_menu
    AdminFu.menu do
      entry :menu1, :menu1_path
      entry :menu2, "/custommenu2"
      entry :menu3, "/"
    end
  end
  
  it "should show configured menus on admin layout" do
    visit admin_fu_root_path
    page.should have_selector("nav[role=mainmenu] ul li a[href='#{menu1_path}']")    
    page.should have_selector("nav[role=mainmenu] ul li a[href='/custommenu2']")    
    page.should have_selector("nav[role=mainmenu] ul li a[href='/']")    
  end
  
  after :each do
    Rails.application.reload_routes!
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
admin_fu-0.1.0 spec/requests/menu_spec.rb