refactored tests for links and tags