Sha256: 6f226152b6b56a4546c6b9f10a1c692a65d34ee8134d8f58e6593596f03602ef

Contents?: true

Size: 578 Bytes

Versions: 19

Compression:

Stored size: 578 Bytes

Contents

require 'rails_helper'

describe Pulitzer::PostTypesController::ImportVersion do
  let(:post_type) {Pulitzer::PostType.first}

  it "imports a version" do
    old_ptv = post_type.published_type_version
    ptv_json = Pulitzer::PostTypeVersionsController::Export.new(old_ptv).call
    json_file = StringIO.new(ptv_json)
    post_type_version = Pulitzer::PostTypesController::ImportVersion.new(post_type, {import_json: json_file}).call
    expect(post_type_version.version_number).to eq old_ptv.version_number + 1
    expect(post_type_version.status).to eq 'incomplete'
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
pulitzer-0.15.31 spec/interactions/pulitzer/post_types_controller/import_version_spec.rb
pulitzer-0.15.30 spec/interactions/pulitzer/post_types_controller/import_version_spec.rb
pulitzer-0.15.29 spec/interactions/pulitzer/post_types_controller/import_version_spec.rb
pulitzer-0.15.28 spec/interactions/pulitzer/post_types_controller/import_version_spec.rb
pulitzer-0.15.27 spec/interactions/pulitzer/post_types_controller/import_version_spec.rb
pulitzer-0.15.26 spec/interactions/pulitzer/post_types_controller/import_version_spec.rb
pulitzer-0.15.25 spec/interactions/pulitzer/post_types_controller/import_version_spec.rb
pulitzer-0.15.24 spec/interactions/pulitzer/post_types_controller/import_version_spec.rb
pulitzer-0.15.23 spec/interactions/pulitzer/post_types_controller/import_version_spec.rb
pulitzer-0.15.22 spec/interactions/pulitzer/post_types_controller/import_version_spec.rb
pulitzer-0.15.21 spec/interactions/pulitzer/post_types_controller/import_version_spec.rb
pulitzer-0.15.20 spec/interactions/pulitzer/post_types_controller/import_version_spec.rb
pulitzer-0.15.19 spec/interactions/pulitzer/post_types_controller/import_version_spec.rb
pulitzer-0.15.18 spec/interactions/pulitzer/post_types_controller/import_version_spec.rb
pulitzer-0.15.17 spec/interactions/pulitzer/post_types_controller/import_version_spec.rb
pulitzer-0.15.16 spec/interactions/pulitzer/post_types_controller/import_version_spec.rb
pulitzer-0.15.15 spec/interactions/pulitzer/post_types_controller/import_version_spec.rb
pulitzer-0.15.14 spec/interactions/pulitzer/post_types_controller/import_version_spec.rb
pulitzer-0.15.13 spec/interactions/pulitzer/post_types_controller/import_version_spec.rb