require 'test_helper' class HelperMethodsTest < ActionView::TestCase include Gretel::HelperMethods fixtures :all test "should show root breadcrumb" do breadcrumb :root response = breadcrumb assert_equal %{}, response end test "should show basic breadcrumb" do breadcrumb :basic response = breadcrumb assert_equal %{}, response end test "should show breadcrumb with root" do breadcrumb :with_root response = breadcrumb assert_equal %{}, response end test "should show breadcrumb with parent" do breadcrumb :with_parent response = breadcrumb assert_equal %{}, response end test "should show breadcrumb with autopath" do breadcrumb :with_autopath, projects(:one) response = breadcrumb assert_equal %{}, response end test "should show breadcrumb with parent object" do breadcrumb :with_parent_object, issues(:one) response = breadcrumb assert_equal %{}, response end test "should show multiple links" do breadcrumb :multiple_links response = breadcrumb assert_equal %{}, response end test "should show multiple links with parent" do breadcrumb :multiple_links_with_parent response = breadcrumb assert_equal %{}, response end test "should show semantic breadcrumb" do breadcrumb :with_root response = breadcrumb(:semantic => true) assert_equal %{}, response end test "should show no breadcrumb" do assert_equal "", breadcrumb end test "should link current breadcrumb" do breadcrumb :with_root response = breadcrumb(:link_current => true) assert_equal %{}, response end test "should show pretext" do breadcrumb :basic response = breadcrumb(:pretext => "You are here: ") assert_equal %{}, response end test "should show posttext" do breadcrumb :basic response = breadcrumb(:posttext => " - text after breadcrumbs") assert_equal %{}, response end test "should show autoroot" do breadcrumb :basic response = breadcrumb(:autoroot => true) assert_equal %{}, response end test "should show separator" do breadcrumb :with_root response = breadcrumb(:separator => " › ") assert_equal %{}, response end test "should show element id" do breadcrumb :basic response = breadcrumb(:id => "custom_id") assert_equal %{}, response end end