August 2025
Intermediate to advanced
294 pages
6h 59m
English
For artist actions like search or update, we’ll need some records to exist in the data layer before we can run our actions and check the results. There are two approaches to this:
The first approach is to do what we’ve already been doing throughout this book: calling resource actions. These tests can be seen as a series of events.
| | # Demonstration test only |
| | # There are tests for this action in Tunez, but not written like this! |
| | defmodule Tunez.Music.ArtistTest do |
| | # ... |
| | |
| | describe "Tunez.Music.search_artists!/1-3" do |
| | test "can find artists by partial name match" ... |
Read now
Unlock full access