Sha256: 8bb9d5fecc8b6ca4052aa07c7fed136a6ae29bd840d5251c3656fa12d1b59f4f

Contents?: true

Size: 1.01 KB

Versions: 4

Compression:

Stored size: 1.01 KB

Contents

require 'test_helper'
require 'menu_maker'
require 'integration_test_helper'

module MenuMaker
  class MenuHelperTest < ActionView::TestCase
    include MenuTestHelper

    test 'outputs the menu with the first li active' do
      expected_output = menu_fixture(
        dashboard_li_class: 'active open',
        suppliers_li_class: 'dropdown'
      )

      assert_equal example_menu('/cms/dashboard').render, expected_output
    end

    test 'outputs the menu with the first li submenu item active' do
      expected_output = menu_fixture(
        suppliers_li_class: 'dropdown active open',
        add_supplier_class: 'active'
      )

      assert_equal example_menu('/cms/suppliers/new').render, expected_output
    end

    test 'outputs the menu with the second li submenu item selected' do
      expected_output = menu_fixture(
        suppliers_li_class: 'dropdown active open',
        list_supplier_class: 'active'
      )

      assert_equal example_menu('/cms/suppliers').render, expected_output
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
menu_maker-0.0.4 test/menu_maker_test.rb
menu_maker-0.0.3 test/menu_maker_test.rb
menu_maker-0.0.2 test/menu_maker_test.rb
menu_maker-0.0.1 test/menu_maker_test.rb