Sha256: ef0f38db31df1d8989441eef9dcdce624e064b84dcc9179ef6ba28d925f5c902

Contents?: true

Size: 649 Bytes

Versions: 40

Compression:

Stored size: 649 Bytes

Contents

require 'test_helper'

module Workarea
  class Content
    class BlockNameTest < TestCase
      def test_not_erroring_for_configured_blocks
        assert_nothing_raised do
          Workarea.config.content_block_types.each do |type|
            block = Block.new(type: type, data: type.defaults)
            BlockName.new(block).to_s
          end
        end
      end

      def test_name_is_human_readable
        Workarea.config.content_block_types.each do |type|
          block = Block.new(type: type, data: type.defaults)
          name = BlockName.new(block).to_s

          refute_match(/\[/, name)
        end
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
workarea-core-3.4.26 test/models/workarea/content/block_name_test.rb
workarea-core-3.5.3 test/models/workarea/content/block_name_test.rb
workarea-core-3.4.25 test/models/workarea/content/block_name_test.rb
workarea-core-3.5.2 test/models/workarea/content/block_name_test.rb
workarea-core-3.4.24 test/models/workarea/content/block_name_test.rb
workarea-core-3.5.1 test/models/workarea/content/block_name_test.rb
workarea-core-3.4.23 test/models/workarea/content/block_name_test.rb
workarea-core-3.4.22 test/models/workarea/content/block_name_test.rb
workarea-core-3.5.0 test/models/workarea/content/block_name_test.rb
workarea-core-3.4.21 test/models/workarea/content/block_name_test.rb
workarea-core-3.5.0.beta.1 test/models/workarea/content/block_name_test.rb
workarea-core-3.4.20 test/models/workarea/content/block_name_test.rb
workarea-core-3.4.19 test/models/workarea/content/block_name_test.rb
workarea-core-3.4.18 test/models/workarea/content/block_name_test.rb
workarea-core-3.4.17 test/models/workarea/content/block_name_test.rb
workarea-core-3.4.16 test/models/workarea/content/block_name_test.rb
workarea-core-3.4.15 test/models/workarea/content/block_name_test.rb
workarea-core-3.4.14 test/models/workarea/content/block_name_test.rb
workarea-core-3.4.13 test/models/workarea/content/block_name_test.rb
workarea-core-3.4.12 test/models/workarea/content/block_name_test.rb