Sha256: ea62526f7165360e854bd064f9ec87994b6cada8dc9f38f160a1a97af42ba206

Contents?: true

Size: 824 Bytes

Versions: 62

Compression:

Stored size: 824 Bytes

Contents

require 'test_helper'

module Workarea
  module Storefront
    class ApplicationHelperTest < ViewTest
      def test_page_title
        assert(page_title('Test Title').starts_with?('Test Title'))
      end

      def test_render_message
        message_html = render_message('error', 'Foo', data: { bar: 'baz' })
        assert_includes(message_html, 'message--error')
        assert_includes(message_html, 'Error')
        assert_includes(message_html, 'Foo')
        assert_includes(message_html, "data-bar='baz'")

        message_html = render_message('success', title: 'Qux') { 'Bar' }
        assert_includes(message_html, 'message--success')
        assert_includes(message_html, 'Success')
        assert_includes(message_html, 'Bar')
        assert_includes(message_html, "title='Qux'")
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-storefront-3.5.27 test/helpers/workarea/storefront/application_helper_test.rb
workarea-storefront-3.5.26 test/helpers/workarea/storefront/application_helper_test.rb
workarea-storefront-3.4.45 test/helpers/workarea/storefront/application_helper_test.rb
workarea-storefront-3.5.25 test/helpers/workarea/storefront/application_helper_test.rb
workarea-storefront-3.5.23 test/helpers/workarea/storefront/application_helper_test.rb
workarea-storefront-3.4.44 test/helpers/workarea/storefront/application_helper_test.rb
workarea-storefront-3.5.22 test/helpers/workarea/storefront/application_helper_test.rb
workarea-storefront-3.4.43 test/helpers/workarea/storefront/application_helper_test.rb
workarea-storefront-3.5.21 test/helpers/workarea/storefront/application_helper_test.rb
workarea-storefront-3.4.42 test/helpers/workarea/storefront/application_helper_test.rb
workarea-storefront-3.5.20 test/helpers/workarea/storefront/application_helper_test.rb
workarea-storefront-3.4.41 test/helpers/workarea/storefront/application_helper_test.rb
workarea-storefront-3.5.19 test/helpers/workarea/storefront/application_helper_test.rb
workarea-storefront-3.4.40 test/helpers/workarea/storefront/application_helper_test.rb
workarea-storefront-3.5.18 test/helpers/workarea/storefront/application_helper_test.rb
workarea-storefront-3.4.39 test/helpers/workarea/storefront/application_helper_test.rb
workarea-storefront-3.5.17 test/helpers/workarea/storefront/application_helper_test.rb
workarea-storefront-3.4.38 test/helpers/workarea/storefront/application_helper_test.rb
workarea-storefront-3.5.16 test/helpers/workarea/storefront/application_helper_test.rb
workarea-storefront-3.4.37 test/helpers/workarea/storefront/application_helper_test.rb