require 'test_helper' class NavbarTest < ActionView::TestCase test 'Navbar' do actual = UiBibz::Ui::Core::Navigations::Navbar.new.tap do |nb| end expected = "" assert_equal expected, actual.render end test 'Navbar with options' do actual = UiBibz::Ui::Core::Navigations::Navbar.new(title: 'Brand', expand_size: :xs, status: :primary, position: :top, brand_position: :right).tap do |nb| end expected = "" assert_equal expected, actual.render end test 'Navbar with brand, nav, form and text' do actual = UiBibz::Ui::Core::Navigations::Navbar.new.tap do |nb| nb.brand "Brand" nb.nav do |n| n.link 'Home', state: :active, url: "#Home", selector: 'home' n.link 'Profile', url: "#profile", selector: 'profile' n.link 'Messages', url: "#messages", selector: 'messages' end nb.form "#", { type: :form_tag, position: :right } do UiBibz::Ui::Core::Forms::Texts::TextField.new('search').render UiBibz::Ui::Core::Forms::Buttons::Button.new('Search').render end nb.text 'test' end expected = "" assert_equal expected, actual.render end test 'status' do actual = UiBibz::Ui::Core::Navigations::Navbar.new(type: :dark, status: :dark).tap do |nb| nb.brand image_tag 'ruby-white' nb.nav do |n| n.link 'Link', url: '#link' end end expected = "" assert_equal expected, actual.render end end