diff options
author | Eric Wong <e@80x24.org> | 2015-11-22 01:05:05 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-11-22 12:01:56 +0000 |
commit | 9581a01c87a7d8bf228bdec7d4f06bf8a3fed3ec (patch) | |
tree | 47d824524009eae8d13700cc1e2f5db8c6b4430f /test | |
parent | 2d1e3c9dcb40ccf2182045924530a804b578ba9f (diff) | |
download | dtas-9581a01c87a7d8bf228bdec7d4f06bf8a3fed3ec.tar.gz |
Eventually this will support searching and be the basis of an mpd-compatible proxy in front of dtas-player
Diffstat (limited to 'test')
-rw-r--r-- | test/test_mlib.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/test_mlib.rb b/test/test_mlib.rb new file mode 100644 index 0000000..072d1d0 --- /dev/null +++ b/test/test_mlib.rb @@ -0,0 +1,31 @@ +# Copyright (C) 2013-2015 all contributors <dtas-all@nongnu.org> +# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt) +require_relative 'helper' +begin + require 'dtas/mlib' + require 'sequel/no_core_ext' + require 'sqlite3' +rescue LoadError => err + warn "skipping mlib test: #{err.message}" + exit 0 +end + +class TestMlib < Testcase + def setup + @db = Sequel.sqlite(':memory:') + end + + def test_migrate + ml = DTAS::Mlib.new(@db) + begin + $-w = false + ml.migrate + tables = @db.tables + ensure + $-w = true + end + [ :nodes, :tags, :vals, :comments ].each do |t| + assert tables.include?(t), "missing #{t}" + end + end +end |