Sha256: 0f2d54f561b755d884b4d29c691cdd940d5645326d3be68f731500f98d935791

Contents?: true

Size: 792 Bytes

Versions: 8

Compression:

Stored size: 792 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require "active_fedora"

describe VideoAsset do
  
  before(:each) do
    Fedora::Repository.stubs(:instance).returns(stub_everything())
    @asset = VideoAsset.new
    @asset.stubs(:create_date).returns("2008-07-02T05:09:42.015Z")
    @asset.stubs(:modified_date).returns("2008-09-29T21:21:52.892Z")
  end
  
  it "Should be a kind of ActiveFedora::Base kind of FileAsset, and instance of VideoAsset" do
    @asset.should be_kind_of(ActiveFedora::Base)
    @asset.should be_kind_of(FileAsset)
    @asset.should be_instance_of(VideoAsset)
  end
  
  it "should have a conforms_to relationship pointing to FileAsset" do
    @asset.relationships[:self][:has_model].should include("info:fedora/afmodel:FileAsset")
  end
  
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
hydra-head-3.0.1 test_support/spec/models/video_asset_spec.rb
hydra-head-3.0.0 test_support/spec/models/video_asset_spec.rb
hydra-head-3.0.0.rc2 test_support/spec/models/video_asset_spec.rb
hydra-head-3.0.0.rc1 test_support/spec/models/video_asset_spec.rb
hydra-head-3.0.0pre4 test_support/spec/models/video_asset_spec.rb
hydra-head-3.0.0pre3 test_support/spec/models/video_asset_spec.rb
hydra-head-3.0.0pre2 test_support/spec/models/video_asset_spec.rb
hydra-head-3.0.0pre1 test_support/spec/models/video_asset_spec.rb