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