Sha256: 3daccfd45d9c25558d160c47a239ed2ea0ce58e128c2baa0ae1012f6ecb0d46e
Contents?: true
Size: 1.15 KB
Versions: 3
Compression:
Stored size: 1.15 KB
Contents
module Duracloud RSpec.describe AuditLog do let(:tsv) { File.read(File.expand_path('../../fixtures/audit_log.tsv', __FILE__)) } before { allow(subject).to receive(:tsv) { tsv } } subject { described_class.new("myspace") } describe "CSV" do 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.csv.size).to eq(7) expect(subject.csv.to_s.split("\n").first).to eq("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.next).to eq({"account"=>"example", "store_id"=>"1065", "space_id"=>"myspace", "content_id"=>"", "content_md5"=>"", "content_size"=>"", "content_mimetype"=>"", "content_properties"=>"", "space_acls"=>"", "source_space_id"=>"", "source_content_id"=>"", "timestamp"=>"2016-04-27T18:34:18.018", "action"=>"CREATE_SPACE", "username"=>"bob@example.com"}) } end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
duracloud-client-0.2.0 | spec/unit/audit_log_spec.rb |
duracloud-client-0.1.5 | spec/unit/audit_log_spec.rb |
duracloud-client-0.1.4 | spec/unit/audit_log_spec.rb |