ElixirWeekly: The Elixir Community Newsletter, covering community news you easily miss, shared on ElixirStatus and the web, in one email every Thursday.
Elixir/Phoenix is pure functional compare to Ruby/Rails, the basic building blocks (Plugs) are just functions, which would be super easy to unit test. Though there were some blog posts demonstrating how to mock Context in ConnTest using Mox, there were almost no resources teaching how to unit test a Phoenix controller (calling controller functions directly in test cases).
This post’s main purpose is to fill that gap and explain the full TDD cycle developing a new feature.
Read next Railsy Model Helpers for Ecto