O'Reilly logo

Rails, Angular, Postgres, and Bootstrap, 2nd Edition by David B. Copeland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing Back-End Integration Using TDD

You already know how to fetch the customer’s details from the server—you’d do it just the way you did in Get Data from the Back End. You’ve also seen how to write acceptance and unit tests for a feature like this, but another example could really help cement your understanding of these complex concepts. It’s also worth seeing how a TDD-based flow could work, for those of you who prefer test-driven development. (If you aren’t familiar with TDD, Test Driven Development [Bec10] is a great place to get started.)

In this section, we’ll create an acceptance test that works with the client-side navigation we just implemented. Then we’ll create a unit test for ngOnInit that confirms that it’s calling the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required