From 9581a01c87a7d8bf228bdec7d4f06bf8a3fed3ec Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 22 Nov 2015 01:05:05 +0000 Subject: introduce dtas-mlib for music library functions Eventually this will support searching and be the basis of an mpd-compatible proxy in front of dtas-player --- test/test_mlib.rb | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 test/test_mlib.rb (limited to 'test') 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 +# 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 -- cgit v1.2.3-24-ge0c7