add test for directive