reduced duplication of code of static_pages spec
added test for internal layout links
used app/helper for spec