# Copyright (c) 2015, Xhive Global Ltd. and Contributors
# License: MIT. See LICENSE

import xhiveframework
from xhiveframework.desk.form.linked_with import get_linked_docs, get_linked_doctypes
from xhiveframework.tests.utils import XhiveFrameworkTestCase


class TestForm(XhiveFrameworkTestCase):
	def test_linked_with(self):
		results = get_linked_docs("Role", "System Manager", linkinfo=get_linked_doctypes("Role"))
		self.assertTrue("User" in results)
		self.assertTrue("DocType" in results)


if __name__ == "__main__":
	import unittest

	xhiveframework.connect()
	unittest.main()
