# Copyright (c) 2017, XhiveFramework Technologies and Contributors
# License: MIT. See LICENSE
import xhiveframework
from xhiveframework.tests.utils import XhiveFrameworkTestCase


class TestLetterHead(XhiveFrameworkTestCase):
	def test_auto_image(self):
		letter_head = xhiveframework.get_doc(
			dict(doctype="Letter Head", letter_head_name="Test", source="Image", image="/public/test.png")
		).insert()

		# test if image is automatically set
		self.assertTrue(letter_head.image in letter_head.content)
