Sha256: e8057d1cbbf58b0323362c62fb53718a4e0ab1cd54b481e6ff5fac2cf2d29b4e

Contents?: true

Size: 1.04 KB

Versions: 12

Compression:

Stored size: 1.04 KB

Contents

require 'support/shared_examples_for_tsv'

module Duracloud
  RSpec.describe AuditLog do

    subject { described_class.new("myspace") }

    let(:path) { File.expand_path('../../fixtures/audit_log.tsv', __FILE__) }

    it_behaves_like "a TSV"

    describe "#csv" do
      before {
        allow(subject).to receive(:tsv) { File.read(path) }
        subject.csv.read
      }
      specify {
        expect(subject.csv.headers).to eq(%w(account store_id space_id content_id content_md5 content_size content_mimetype content_properties space_acls source_space_id source_content_id timestamp action username))
        expect(subject.rows.to_a.size).to eq(6)
        expect(subject.rows.first).to eq({"account"=>"example", "store_id"=>"1065", "space_id"=>"myspace", "content_id"=>nil, "content_md5"=>nil, "content_size"=>nil, "content_mimetype"=>nil, "content_properties"=>nil, "space_acls"=>nil, "source_space_id"=>nil, "source_content_id"=>nil, "timestamp"=>"2016-04-27T18:34:18.018", "action"=>"CREATE_SPACE", "username"=>"bob@example.com"})
      }
    end

  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
duracloud-client-0.10.2 spec/unit/audit_log_spec.rb
duracloud-client-0.10.1 spec/unit/audit_log_spec.rb
duracloud-client-0.10.0 spec/unit/audit_log_spec.rb
duracloud-client-0.9.1 spec/unit/audit_log_spec.rb
duracloud-client-0.9.0 spec/unit/audit_log_spec.rb
duracloud-client-0.8.0 spec/unit/audit_log_spec.rb
duracloud-client-0.7.2 spec/unit/audit_log_spec.rb
duracloud-client-0.7.1 spec/unit/audit_log_spec.rb
duracloud-client-0.7.0 spec/unit/audit_log_spec.rb
duracloud-client-0.6.0 spec/unit/audit_log_spec.rb
duracloud-client-0.5.0 spec/unit/audit_log_spec.rb
duracloud-client-0.4.0 spec/unit/audit_log_spec.rb