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