changed to connect test database
separated test
removed depend on Pit at test
fixed indent