Sha256: 7337e7af440ce2fc4a98de6f462b88c6cfc511cf61cc37833c4ccc39706066d3

Contents?: true

Size: 607 Bytes

Versions: 6

Compression:

Stored size: 607 Bytes

Contents

require 'test_helper'

module ExpressAdmin

  class WidgetBoxTest < ActiveSupport::TestCase

    def helpers
      mock_action_view(assigns)
    end

    def assigns
      {resource: Widget.first}
    end

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

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

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

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
express_admin-1.4.10 test/dummy/test/components/widget_box_test.rb
express_admin-1.4.9 test/dummy/test/components/widget_box_test.rb
express_admin-1.4.8 test/dummy/test/components/widget_box_test.rb
express_admin-1.4.7 test/dummy/test/components/widget_box_test.rb
express_admin-1.4.6 test/dummy/test/components/widget_box_test.rb
express_admin-1.4.5 test/dummy/test/components/widget_box_test.rb