spec/unit/datastreams_spec.rb in active-fedora-7.1.0 vs spec/unit/datastreams_spec.rb in active-fedora-7.1.1

- old
+ new

@@ -211,12 +211,22 @@ ds = subject.create_datastream(ActiveFedora::Datastream, nil, {:blob => mock_file}) ds.mimeType.should == 'application/octet-stream' end it "should use the filename as a default label" do - mock_file = double(:path => '/asdf/fdsa') + mock_file = double(:path => '/asdf/fdsa') ds = subject.create_datastream(ActiveFedora::Datastream, nil, {:blob => mock_file}) ds.dsLabel.should == 'fdsa' + end + + it "should not set content for controlGroup 'E'" do + ds = subject.create_datastream(ActiveFedora::Datastream, nil, {controlGroup: 'E'}) + expect(ds.content).to be_nil + end + + it "should not set content for controlGroup 'R'" do + ds = subject.create_datastream(ActiveFedora::Datastream, nil, {controlGroup: 'R'}) + expect(ds.content).to be_nil end end describe "#additional_attributes_for_external_and_redirect_control_groups" do before(:all) do