Add `arrived` attribute (file creation timestamp) to books table.
[quanlib.git] / store_test.rb
1
2 require 'minitest/autorun'
3 require 'store'
4
5 class StoreTest < MiniTest::Test
6   def test_construct_efs_path
7     data = [ [      1234, '00/00/00/12', '0000001234.dat'],
8              [         1, '00/00/00/00', '0000000001.dat'],
9              [1234567890, '12/34/56/78', '1234567890.dat'],
10              [   7778123, '00/07/77/81', '0007778123.dat'],
11              [      0x1b, '00/00/00/00', '0000000027.dat'] ]
12
13     store = Store.new()
14
15     for (input, expectedPath, expectedName) in data
16       (actualPath, actualName) = store.construct_efs_path(input)
17       assert_equal(expectedPath, actualPath)
18       assert_equal(expectedName, actualName)
19     end
20   end
21 end