Add links controller tests.

Also adds doc formatting to rspec output.

Minor change in the links controller to use links belonging to the
current group, not just any link in the model.