Using Fixture Functions Directly
Let’s learn how to test our templates and wrap up the use of fixtures in our tests.
We'll cover the following
Testing our templates
We have a single test we’ll need for templates. We want to make sure templates get compiled correctly. That test would be difficult if we had to do all of the setup work in the test block itself. Instead, we’ll use the helper functions in QuizBuilders
to churn our test out quickly.
We’ll create a new file template_test.exs
in the test
folder and add our latest test, like this:
Get hands-on with 1400+ tech skills courses.