Sha256: fdad45e3e3ed623351cc72e07f4e45474b13c495c51576087a6fd2abc72f2991
Contents?: true
Size: 873 Bytes
Versions: 6
Compression:
Stored size: 873 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: 'Inicio', 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: 'shared/breadcrumb', locals: { nav: @breadcrumb, divider: 'divider' }) ) end end
Version data entries
6 entries across 6 versions & 1 rubygems