Sha256: 26ed09b02d39753a8c37b705b69dc75b9839aab0d74ce18070e44ea6aea52365

Contents?: true

Size: 656 Bytes

Versions: 3

Compression:

Stored size: 656 Bytes

Contents

require 'spec_helper'

describe PropertiesDatastream do
  it "should have proxy_depositor" do
    subject.proxy_depositor = 'kim@example.com'
    subject.proxy_depositor.should == ['kim@example.com']
    subject.ng_xml.to_xml.should be_equivalent_to "<?xml version=\"1.0\"?><fields><proxyDepositor>kim@example.com</proxyDepositor></fields>"
  end

  describe "to_solr" do
    before do
      @doc = PropertiesDatastream.new.tap do |ds|
        ds.proxy_depositor = 'kim@example.com'
      end 
    end
    subject { @doc.to_solr}
    it "should have proxy_depositor" do
      subject['proxy_depositor_ssim'].should == ['kim@example.com']
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sufia-1.3.0 spec/models/properties_datastream_spec.rb
sufia-1.2.0 spec/models/properties_datastream_spec.rb
sufia-1.1.0 spec/models/properties_datastream_spec.rb