Sha256: f16d1d3029cd241ede214fd8cb433c280fb3861f5f1e960c9d9624f65b61eb67

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 AudioAsset do
  
  before(:each) do
    Fedora::Repository.stubs(:instance).returns(stub_everything())
    @asset = AudioAsset.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 AudioAsset" do
    @asset.should be_kind_of(ActiveFedora::Base)
    @asset.should be_kind_of(FileAsset)
    @asset.should be_instance_of(AudioAsset)
  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/audio_asset_spec.rb
hydra-head-3.0.0 test_support/spec/models/audio_asset_spec.rb
hydra-head-3.0.0.rc2 test_support/spec/models/audio_asset_spec.rb
hydra-head-3.0.0.rc1 test_support/spec/models/audio_asset_spec.rb
hydra-head-3.0.0pre4 test_support/spec/models/audio_asset_spec.rb
hydra-head-3.0.0pre3 test_support/spec/models/audio_asset_spec.rb
hydra-head-3.0.0pre2 test_support/spec/models/audio_asset_spec.rb
hydra-head-3.0.0pre1 test_support/spec/models/audio_asset_spec.rb