Sha256: 0d085a6bc6b918f19c14677f718e68d0f266512f51f7b93a988cb9b29811adb0
Contents?: true
Size: 577 Bytes
Versions: 2
Compression:
Stored size: 577 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 with_persisted_area(collection.name_of_area_to_assign) do root.fetch('pid') root.fetch('area').must_equal collection.area.pid end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
common_repository_model-0.1.0 | spec/common_respository_model/collection_serializer_spec.rb |
common_repository_model-0.0.9 | spec/common_respository_model/collection_serializer_spec.rb |