Sha256: db4ea9ade1fe91ba7e147bf6af634249d74d345a970e91c757fc5b1321a45aca

Contents?: true

Size: 575 Bytes

Versions: 4

Compression:

Stored size: 575 Bytes

Contents

require_relative '../spec_helper'
require 'common_repository_model/data_serializer'

describe CommonRepositoryModel::DataSerializer do
  subject { CommonRepositoryModel::DataSerializer.new(data) }
  let(:data) { FactoryGirl.build(:common_repository_model_data) }
  let(:json) { JSON.parse(subject.to_json) }
  let(:root) { json.fetch('data') }
  it 'should be JSON' do
    root.fetch('pid')
    root.fetch('slot_name').must_equal data.slot_name
    root.fetch('md5_checksum').must_equal data.md5_checksum
    root.fetch('collection').must_equal data.collection.pid
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
common_repository_model-0.1.0 spec/common_respository_model/data_serializer_spec.rb
common_repository_model-0.0.9 spec/common_respository_model/data_serializer_spec.rb
common_repository_model-0.0.8 spec/common_respository_model/data_serializer_spec.rb
common_repository_model-0.0.7 spec/common_respository_model/data_serializer_spec.rb