Rewrite unit tests as specs so they can be disabled by plugins.

https://www.openproject.org/issues/1834