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-2.0.0.b test/dummy/test/components/widget_box_test.rb
express_admin-2.0.0.a test/dummy/test/components/widget_box_test.rb
express_admin-1.8.1 test/dummy/test/components/widget_box_test.rb
express_admin-1.8.0 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.32 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.31 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.30 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.29 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.28 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.27 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.26 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.25 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.24 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.23 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.22 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.21 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.20 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.19 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.18 test/dummy/test/components/widget_box_test.rb
express_admin-1.7.17 test/dummy/test/components/widget_box_test.rb