Sha256: 6c89befd6189a913e35c29e192330815668262a06d2acdf9beb3ab6960aed0bd

Contents?: true

Size: 715 Bytes

Versions: 8

Compression:

Stored size: 715 Bytes

Contents

require 'spec_helper'

describe PropertiesDatastream do

  it "should have import_url" do
    subject.import_url = 'http://example.com/somefile.txt'
    subject.import_url.should == ['http://example.com/somefile.txt']
    subject.ng_xml.to_xml.should be_equivalent_to "<?xml version=\"1.0\"?><fields><importUrl>http://example.com/somefile.txt</importUrl></fields>"
  end

  describe "to_solr" do
    before do
      @doc = PropertiesDatastream.new(nil, 'properties').tap do |ds|
        ds.import_url = 'http://example.com/somefile.txt'
      end
    end
    subject { @doc.to_solr}
    it "should have import_url" do
      subject['import_url_ssim'].should == ['http://example.com/somefile.txt']
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sufia-4.0.1 spec/models/properties_datastream_spec.rb
sufia-4.0.0 spec/models/properties_datastream_spec.rb
sufia-4.0.0.rc2 spec/models/properties_datastream_spec.rb
sufia-4.0.0.rc1 spec/models/properties_datastream_spec.rb
sufia-4.0.0.beta4 spec/models/properties_datastream_spec.rb
sufia-4.0.0.beta3 spec/models/properties_datastream_spec.rb
sufia-4.0.0.beta2 spec/models/properties_datastream_spec.rb
sufia-4.0.0.beta1 spec/models/properties_datastream_spec.rb