Add unit tests for pages and spec