 	args = (i for i in arguments)
 	mg.migrate.sync mg, conn, tables: args
 
+clearTables = ->
+	query 'TRUNCATE ' + [].join.call(arguments, ', ')
+
 insert = (dbName, fields) ->
 	params = []
 	values = []

		test.done()

	testWrongSessid: (test) ->
		migrateTables 'permission_kind', 'uniusers'
		test.throws(
			-> game.getUserLocationId.sync(null, conn, -1)
			Error

	test.done()

exports.uninvolve = (test) ->
	clearTables 'uniusers', 'battle_participants'
	insert 'uniusers', id: 1, autoinvolved_fm: 1
	insert 'battle_participants', kind: 'user', id: 1
	game.uninvolve.sync null, conn, 1
