Sha256: d82bb5140d03014f6795c1e1f7e479df3ab5cd96f35b2b304ab13edc59b86ffa
Contents?: true
Size: 503 Bytes
Versions: 2
Compression:
Stored size: 503 Bytes
Contents
require_relative '../spec_helper' require 'common_repository_model/collection_serializer' describe CommonRepositoryModel::CollectionSerializer do subject { CommonRepositoryModel::CollectionSerializer.new(collection) } let(:collection) { FactoryGirl.build(:common_repository_model_collection) } let(:json) { JSON.parse(subject.to_json) } let(:root) { json.fetch('collection') } it 'should be JSON' do root.fetch('pid') root.fetch('area').must_equal collection.area.pid end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
common_repository_model-0.0.8 | spec/common_respository_model/collection_serializer_spec.rb |
common_repository_model-0.0.7 | spec/common_respository_model/collection_serializer_spec.rb |