afred/openvault — pull request #574 by mccalluc (2014-08-07 15:08:39+00:00)
Title: Make tab click change url

Fixes #507. Small copy-and-paste from SO, with attribution.

Tried to write a test for this, but couldn't get Capybara to cooperate: I might try harder, but I didn't want to get sucked in. Tried this:
```
visit '/me#digitization_requests'
# (adding sleep didn't help.)
expect(URI.parse(current_url).fragment).to be('digitization_requests')
# TODO check visibility
```
.fragment was returning nil; moreover, current_url didn't even have the path on it, so I'm not sure what I should have done to get the test to work.

(But just clicking works well for me.)