Programming Phoenix LiveView B4.0: P261

The example code for survey_results_live_test.exs has a missing end statement. There needs to be two end, one for closing setup and the other for closing describe.

  describe "socket state" do
    setup [:create_user, :create_product, :create_socket]

    setup %{user: user} do
      create_demographic(user)
      user2 = user_fixture(@create_user2_attrs)
      demographic_fixture(user2, @create_demographic2_attrs)
      [user2: user2]
    end
  end  # <---- new

Thanks for pointing this out! We actually intentionally left the end off because the describe block is not complete until you keep reading to the next example which coaches you through adding a test block below the calls to the setup functions :slight_smile:

Oh, I see.
Looking forward to reading the rest of the book!

1 Like