Sha256: f825458e154e96e8aa31e8683dd60c762260476a84e4e16d09b1224b40051682

Contents?: true

Size: 612 Bytes

Versions: 50

Compression:

Stored size: 612 Bytes

Contents

require 'test_helper'

module ExpressAdmin

  class WidgetBoxTest < ActiveSupport::TestCase

    def helpers
      mock_action_view
    end

    def assigns
      {category: Category.first}
    end

    def rendered_widget_box(*args)
      arbre {
        widget_box(:category, *args)
      }
    end

    test "renders correct widget box title" do
      assert_match /<header class="title">Edit Category/, rendered_widget_box
    end

    test "renders correct widget box title with param" do
      assert_match /<header class="title">Category Box/, rendered_widget_box(title: "Category Box")
    end

  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
express_admin-1.7.16 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.16.pre1 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.15 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.14 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.13 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.12 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.11 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.10 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.9 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.8 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.7 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.5 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.4 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.3 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.2 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.1 test/dummy/test/components/widget_box_test.rb
express_admin-1.6.13 test/dummy/test/components/widget_box_test.rb
express_admin-1.6.12 test/dummy/test/components/widget_box_test.rb
express_admin-1.6.11 test/dummy/test/components/widget_box_test.rb
express_admin-1.6.10 test/dummy/test/components/widget_box_test.rb