Test reorganizing addLink function in links controller