Sha256: ea10f883c220a69ce1b64bab51c3187df99ce4ef3d99eea258abb0377423f47f
Contents?: true
Size: 902 Bytes
Versions: 33
Compression:
Stored size: 902 Bytes
Contents
require 'test_helper' class BreadrumbsHelperTest < ActionView::TestCase include Adminpanel::BreadcrumbsHelper include Rails.application.routes.url_helpers fixtures :all setup :setup teardown :teardown def setup breadcrumb_add('controller', 'http://controller.com') breadcrumb_add('action', 'http://action.com') end def teardown @breadcrumb = :nil end def test_breadcrumb_add assert_equal( { title: I18n.t('breadcrumb.index'), url: adminpanel.root_url }, @breadcrumb.first) assert_equal( { title: 'controller', url: 'http://controller.com' }, @breadcrumb.second) assert_equal( { title: 'action', url: 'http://action.com' }, @breadcrumb.third) end def test_render_breadcrumb assert_equal( render_breadcrumb('divider'), render(partial: 'adminpanel/shared/breadcrumb', locals: { nav: @breadcrumb, divider: 'divider' }) ) end end
Version data entries
33 entries across 33 versions & 1 rubygems