thegreenhouseio / angular-webapp-seed

Angular (2+) and Webpack Seed Project for webapp projects in The Greenhouse
https://www.thegreenhouse.io/
4 stars 2 forks source link

How is the Posts Service returning data? #51

Open paul-barry-kenzan opened 7 years ago

paul-barry-kenzan commented 7 years ago

The Posts Service spec which verifies the number of posts is seemingly returning live data via the getPosts() method. Is this the case? Ideally, the data should be mocked somewhere/somehow, but I'm not seeing that. Could you clarify?

Even when testing the actual service, it's best to avoid any over-the-wire communication to ensure the service is isolated.

thescientist13 commented 7 years ago

busted. 😊

yes, it should be mocked. I suppose I glossed over that fact since PostsService is just returning a canned list of posts.