Sha256: be451395c417e6d8950fb8b12e4969a7afa9dd9927cda897f1b24287354e5dec

Contents?: true

Size: 702 Bytes

Versions: 53

Compression:

Stored size: 702 Bytes

Contents

require 'rails_helper'

describe Pulitzer::CreatePartialContentElements do
  let(:post_type) { pt = create(:post_type, :with_content_elements)
                    pt.update_columns(kind: Pulitzer::PostType.kinds[:partial])
                    pt }
  let(:free_form_section) { Pulitzer::FreeFormSection.create name: 'test'}
  let(:partial)      { free_form_section.partials.create(post_type_id: post_type.id) }

  it 'Copies content elements to preview version' do
    expect(post_type.post_type_content_element_types.size).to eq 3
    expect(partial.content_elements.size).to eq 0
    Pulitzer::CreatePartialContentElements.new(partial).call
    expect(partial.content_elements.size).to eq 3
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
pulitzer-0.15.0 spec/interactions/create_partial_content_elements_spec.rb
pulitzer-0.14.4 spec/interactions/create_partial_content_elements_spec.rb
pulitzer-0.14.3 spec/interactions/create_partial_content_elements_spec.rb
pulitzer-0.14.2 spec/interactions/create_partial_content_elements_spec.rb
pulitzer-0.14.1 spec/interactions/create_partial_content_elements_spec.rb
pulitzer-0.14.0 spec/interactions/create_partial_content_elements_spec.rb
pulitzer-0.13.1 spec/interactions/create_partial_content_elements_spec.rb
pulitzer-0.12.5 spec/interactions/create_partial_content_elements_spec.rb
pulitzer-0.13.0 spec/interactions/create_partial_content_elements_spec.rb
pulitzer-0.12.4 spec/interactions/create_partial_content_elements_spec.rb
pulitzer-0.12.3 spec/interactions/create_partial_content_elements_spec.rb
pulitzer-0.12.2 spec/interactions/create_partial_content_elements_spec.rb
pulitzer-0.12.1 spec/interactions/create_partial_content_elements_spec.rb
pulitzer-0.12.0 spec/interactions/create_partial_content_elements_spec.rb
pulitzer-0.11.3 spec/interactions/create_partial_content_elements_spec.rb
pulitzer-0.11.2 spec/interactions/create_partial_content_elements_spec.rb
pulitzer-0.11.1 spec/interactions/create_partial_content_elements_spec.rb
pulitzer-0.11.0 spec/interactions/create_partial_content_elements_spec.rb
pulitzer-0.10.3 spec/interactions/create_partial_content_elements_spec.rb
pulitzer-0.10.2 spec/interactions/create_partial_content_elements_spec.rb