Wrapping Up

With these final tests, we’re finally done. We’ve accomplished a lot:

  • We examined how tests work in Phoenix.

  • We set up some basic testing functions to insert users and videos, and shared those across all of our potential test cases.

  • We wrote some basic integration tests, bypassing only our authentication plug.

  • We used Phoenix test helpers to make multiple assertions in a compact way.

  • We tested our authentication plug in isolation.

  • We tested our views.

  • We tested models with and without side effects.

Raise a cheer, because we’re through Part I! You should now be able to use Plug, Ecto, and Phoenix to build traditional request/response features for your application and test each of those concepts. Part II will be even more exciting, ...

Get Programming Phoenix now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.