Sha256: ca4126dcb50063130ef09bc809fd2eb0f6ad6a3dc8608a9615ba310ddef4e2b7

Contents?: true

Size: 1.2 KB

Versions: 24

Compression:

Stored size: 1.2 KB

Contents

require 'test_helper'

module Workarea
  module Admin
    class ButtonsHelperTest < ViewTest
      def test_button_tag
        result = button_tag('Content', { data: { foo: 'bar' } })
        assert_match('Content', result)
        assert_match('data-foo="bar"', result)
        assert_match('data-disable="true"', result)

        result = button_tag({ data: { foo: 'bar' } })
        assert_match('data-foo="bar"', result)
        assert_match('data-disable="true"', result)

        result = button_tag({ data: { foo: 'bar', disable: false } })
        assert_match('data-foo="bar"', result)
        refute_match('data-disable="true"', result)

        result = button_tag('Content')
        assert_match('Content', result)
        assert_match('data-disable="true"', result)

        result = button_tag
        assert_match('data-disable="true"', result)

        result = button_tag({ data: { foo: 'bar' } }) { 'Content' }
        assert_match('Content', result)
        assert_match('data-foo="bar"', result)
        assert_match('data-disable="true"', result)

        result = button_tag { 'Content' }
        assert_match('Content', result)
        assert_match('data-disable="true"', result)
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
workarea-admin-3.5.27 test/helpers/workarea/admin/buttons_helper_test.rb
workarea-admin-3.5.26 test/helpers/workarea/admin/buttons_helper_test.rb
workarea-admin-3.5.25 test/helpers/workarea/admin/buttons_helper_test.rb
workarea-admin-3.5.23 test/helpers/workarea/admin/buttons_helper_test.rb
workarea-admin-3.5.22 test/helpers/workarea/admin/buttons_helper_test.rb
workarea-admin-3.5.21 test/helpers/workarea/admin/buttons_helper_test.rb
workarea-admin-3.5.20 test/helpers/workarea/admin/buttons_helper_test.rb
workarea-admin-3.5.19 test/helpers/workarea/admin/buttons_helper_test.rb
workarea-admin-3.5.18 test/helpers/workarea/admin/buttons_helper_test.rb
workarea-admin-3.5.17 test/helpers/workarea/admin/buttons_helper_test.rb
workarea-admin-3.5.16 test/helpers/workarea/admin/buttons_helper_test.rb
workarea-admin-3.5.15 test/helpers/workarea/admin/buttons_helper_test.rb
workarea-admin-3.5.14 test/helpers/workarea/admin/buttons_helper_test.rb
workarea-admin-3.5.13 test/helpers/workarea/admin/buttons_helper_test.rb
workarea-admin-3.5.12 test/helpers/workarea/admin/buttons_helper_test.rb
workarea-admin-3.5.11 test/helpers/workarea/admin/buttons_helper_test.rb
workarea-admin-3.5.10 test/helpers/workarea/admin/buttons_helper_test.rb
workarea-admin-3.5.9 test/helpers/workarea/admin/buttons_helper_test.rb
workarea-admin-3.5.8 test/helpers/workarea/admin/buttons_helper_test.rb
workarea-admin-3.5.7 test/helpers/workarea/admin/buttons_helper_test.rb