Sha256: 5480205200cf0b241f5d7f9f47796bdd6a86eeda55fe9f1a8ce646f795fca9ab

Contents?: true

Size: 1.47 KB

Versions: 16

Compression:

Stored size: 1.47 KB

Contents

require 'pageflow/global_config_api_test_helper'

module Pageflow
  module Lint
    # @api private
    module EntryType
      def self.lint(entry_type)
        RSpec.describe "entry type #{entry_type.name}" do
          let(:entry_type) { entry_type }

          describe '#editor_fragment_renderer' do
            it 'renders head fragment without error' do
              entry = DraftEntry.new(
                FactoryBot.create(
                  :entry,
                  type_name: entry_type.name
                )
              )

              expect {
                entry_type.editor_fragment_renderer.head_fragment(entry)
              }.not_to raise_error
            end

            it 'renders body fragment without error' do
              entry = DraftEntry.new(
                FactoryBot.create(
                  :entry,
                  type_name: entry_type.name
                )
              )

              expect {
                entry_type.editor_fragment_renderer.body_fragment(entry)
              }.not_to raise_error
            end

            it 'renders seed fragment without error' do
              entry = DraftEntry.new(
                FactoryBot.create(
                  :entry,
                  type_name: entry_type.name
                )
              )

              expect {
                entry_type.editor_fragment_renderer.seed_fragment(entry)
              }.not_to raise_error
            end
          end
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
pageflow-support-17.0.4 pageflow/lint/entry_type.rb
pageflow-support-17.0.3 pageflow/lint/entry_type.rb
pageflow-support-17.0.2 pageflow/lint/entry_type.rb
pageflow-support-17.0.1 pageflow/lint/entry_type.rb
pageflow-support-17.0.0 pageflow/lint/entry_type.rb
pageflow-support-16.2.0 pageflow/lint/entry_type.rb
pageflow-support-16.1.0 pageflow/lint/entry_type.rb
pageflow-support-16.0.0 pageflow/lint/entry_type.rb
pageflow-support-15.8.0 pageflow/lint/entry_type.rb
pageflow-support-15.7.1 pageflow/lint/entry_type.rb
pageflow-support-15.7.0 pageflow/lint/entry_type.rb
pageflow-support-15.6.1 pageflow/lint/entry_type.rb
pageflow-support-15.6.0 pageflow/lint/entry_type.rb
pageflow-support-15.5.0 pageflow/lint/entry_type.rb
pageflow-support-15.4.0 pageflow/lint/entry_type.rb
pageflow-support-15.3.0 pageflow/lint/entry_type.rb