Sha256: 99efe5b2c9b404d18b8ec615d37078f073f4933b89c515ac268a34ca4bc98622

Contents?: true

Size: 744 Bytes

Versions: 1

Compression:

Stored size: 744 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../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.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

1 entries across 1 versions & 1 rubygems

Version Path
sufia-3.0.0 spec/models/properties_datastream_spec.rb