Sha256: 741d1ea655066e5611ca87c02a96d56cfd2034c18c2385e653edbeb7c8060bc9

Contents?: true

Size: 845 Bytes

Versions: 29

Compression:

Stored size: 845 Bytes

Contents

require 'spec_helper'

describe ActiveFedora::Auditable do

  before(:all) do
    class AuditableModel < ActiveFedora::Base
      include ActiveFedora::Auditable
    end
    @test_object = AuditableModel.create
    @test_object.reload
  end
  after(:all) do
    @test_object.delete
  end
  it "should have the correct number of audit records" do
    @test_object.audit_trail.records.length.should == 1
  end
  it "should return all the data from each audit record" do
    record = @test_object.audit_trail.records.last
    record.id.should == "AUDREC1"
    record.process_type.should == "Fedora API-M"
    record.action.should == "addDatastream"
    record.component_id.should == "RELS-EXT"
    record.responsibility.should == "fedoraAdmin"
    record.date.should == @test_object.modified_date
    record.justification.should == ""
  end
  
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
active-fedora-7.0.0.rc2 spec/integration/auditable_spec.rb
active-fedora-6.7.6 spec/integration/auditable_spec.rb
active-fedora-7.0.0.rc1 spec/integration/auditable_spec.rb
active-fedora-6.7.5 spec/integration/auditable_spec.rb
active-fedora-7.0.0.pre3 spec/integration/auditable_spec.rb
active-fedora-6.7.4 spec/integration/auditable_spec.rb
active-fedora-7.0.0.pre2 spec/integration/auditable_spec.rb
active-fedora-7.0.0.pre1 spec/integration/auditable_spec.rb
active-fedora-6.7.3 spec/integration/auditable_spec.rb
active-fedora-6.7.2 spec/integration/auditable_spec.rb
active-fedora-6.7.1 spec/integration/auditable_spec.rb
active-fedora-6.7.0 spec/integration/auditable_spec.rb
active-fedora-6.7.0.rc1 spec/integration/auditable_spec.rb
active-fedora-6.6.1 spec/integration/auditable_spec.rb
active-fedora-6.6.0 spec/integration/auditable_spec.rb
active-fedora-6.6.0.rc5 spec/integration/auditable_spec.rb
active-fedora-6.6.0.rc4 spec/integration/auditable_spec.rb
active-fedora-6.6.0.rc3 spec/integration/auditable_spec.rb
active-fedora-6.6.0.rc2 spec/integration/auditable_spec.rb
active-fedora-6.6.0.rc1 spec/integration/auditable_spec.rb