Updating our tests

This all looks good, but if we go back and write our tests, we're going to see a ton of failures! The reason for this is that when we were running around creating our fixtures for various tests, we never specified any values for password and password_confirmation, which is now a required value for us to be able to save any changeset. We'll start off by modifying test/vocial_web/controllers/user_controller_test.exs. The easiest thing to do to start with is setting a module attribute in VocialWeb.UserControllerTest that sets all of the valid creation parameters for a user now:

  @create_params %{    "username" => "test",    "email" => "test@test.com",    "password" => "test",    "password_confirmation" => "test"  }

Notice the addition ...

Get Phoenix Web Development 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.