Add test for the path of TagManager.detach()