added tests for directive