Sha256: c4e8aa55d00e2485c5ccd51f01fe0a6959620da386518254f4b038467670279c

Contents?: true

Size: 1.31 KB

Versions: 27

Compression:

Stored size: 1.31 KB

Contents

require 'spec_helper'

RSpec.describe RubySMB::Fscc::FileInformation::FileBasicInformation do
  it 'references the correct class level' do
    expect(described_class).to be_const_defined(:CLASS_LEVEL)
    expect(described_class::CLASS_LEVEL).to be RubySMB::Fscc::FileInformation::FILE_BASIC_INFORMATION
  end

  subject(:struct) { described_class.new }

  it { should respond_to :create_time }
  it { should respond_to :last_access }
  it { should respond_to :last_write }
  it { should respond_to :last_change }
  it { should respond_to :file_attributes }

  it 'is little endian' do
    expect(described_class.fields.instance_variable_get(:@hints)[:endian]).to eq :little
  end

  it 'tracks the create time in a FileTime field' do
    expect(struct.create_time).to be_a RubySMB::Field::FileTime
  end

  it 'tracks the last access time in a FileTime field' do
    expect(struct.last_access).to be_a RubySMB::Field::FileTime
  end

  it 'tracks the last write time in a FileTime field' do
    expect(struct.last_write).to be_a RubySMB::Field::FileTime
  end

  it 'tracks the last modified time in a FileTime field' do
    expect(struct.last_change).to be_a RubySMB::Field::FileTime
  end

  it 'tracks the file attributes in a FileAttributes field' do
    expect(struct.file_attributes).to be_a RubySMB::Fscc::FileAttributes
  end

end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
ruby_smb-3.3.12 spec/lib/ruby_smb/fscc/file_information/file_basic_information_spec.rb
ruby_smb-3.3.11 spec/lib/ruby_smb/fscc/file_information/file_basic_information_spec.rb
ruby_smb-3.3.10 spec/lib/ruby_smb/fscc/file_information/file_basic_information_spec.rb
ruby_smb-3.3.9 spec/lib/ruby_smb/fscc/file_information/file_basic_information_spec.rb
ruby_smb-3.3.7 spec/lib/ruby_smb/fscc/file_information/file_basic_information_spec.rb
ruby_smb-3.3.6 spec/lib/ruby_smb/fscc/file_information/file_basic_information_spec.rb
ruby_smb-3.3.5 spec/lib/ruby_smb/fscc/file_information/file_basic_information_spec.rb
ruby_smb-3.3.4 spec/lib/ruby_smb/fscc/file_information/file_basic_information_spec.rb
ruby_smb-3.3.3 spec/lib/ruby_smb/fscc/file_information/file_basic_information_spec.rb
ruby_smb-3.3.2 spec/lib/ruby_smb/fscc/file_information/file_basic_information_spec.rb
ruby_smb-3.3.1 spec/lib/ruby_smb/fscc/file_information/file_basic_information_spec.rb
ruby_smb-3.3.0 spec/lib/ruby_smb/fscc/file_information/file_basic_information_spec.rb
ruby_smb-3.2.8 spec/lib/ruby_smb/fscc/file_information/file_basic_information_spec.rb
ruby_smb-3.2.7 spec/lib/ruby_smb/fscc/file_information/file_basic_information_spec.rb
ruby_smb-3.2.6 spec/lib/ruby_smb/fscc/file_information/file_basic_information_spec.rb
ruby_smb-3.2.5 spec/lib/ruby_smb/fscc/file_information/file_basic_information_spec.rb
ruby_smb-3.2.4 spec/lib/ruby_smb/fscc/file_information/file_basic_information_spec.rb
ruby_smb-3.2.3 spec/lib/ruby_smb/fscc/file_information/file_basic_information_spec.rb
ruby_smb-3.2.2 spec/lib/ruby_smb/fscc/file_information/file_basic_information_spec.rb
ruby_smb-3.2.1 spec/lib/ruby_smb/fscc/file_information/file_basic_information_spec.rb