<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="194330" data-post-id="194330">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="tjdam" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/tjdam/120/20256_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  tjdam
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>That answers my question, thank you!</p>
<p>And thank you again for the book <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="194330" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/test-driven-development-with-phoenix-self-published-free/35154/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-194330" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="194330"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #21"></div>
  </section>
</div>
    <div class="postbit" id="194612" data-post-id="194612">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="mstibbard" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mstibbard/120/39678_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  mstibbard
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Some errata for you <img src="https://forum.elixirforum.com/images/emoji/apple/slightly_smiling_face.png?v=15" title=":slightly_smiling_face:" class="emoji" alt=":slightly_smiling_face:" loading="lazy" width="20" height="20"></p>
<p>In chapter 8 (authentication) during refactoring you move <code>import ChatterWeb.ConnTestHelpers</code> into ChatterWeb.ConnCase but your example code highlights the wrong thing as being added (<code>import Chatter.Factory</code>)</p>
<p>At the end of chapter 9 (creating users) if you run the server and try to create a user you will get the following error despite all tests passing.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">[debug] Processing with ChatterWeb.SessionController.create/2
  Parameters: %{"_csrf_token" =&gt; "AWNgFCMXGTFbTTM4MTwCITsMDzkwCCdQw-TpIomu4yZusykgM9PifMb2", "email" =&gt; "test@test.com", "password" =&gt; "[FILTERED]"}
  Pipelines: [:browser]
[debug] QUERY OK source="users" db=0.8ms queue=1.3ms idle=1252.9ms
SELECT u0."id", u0."email", u0."hashed_password", u0."session_secret", u0."inserted_at", u0."updated_at" FROM "users" AS u0 WHERE (u0."email" = $1) ["test@test.com"]
[info] CONNECTED TO ChatterWeb.UserSocket in 51µs
  Transport: :websocket
  Serializer: Phoenix.Socket.V2.JSONSerializer
  Parameters: %{"vsn" =&gt; "2.0.0"}
[info] Sent 500 in 203ms
[error] #PID&lt;0.914.0&gt; running ChatterWeb.Endpoint (connection #PID&lt;0.903.0&gt;, stream id 3) terminated
Server: localhost:4000 (http)
Request: POST /sessions
** (exit) an exception was raised:
    ** (UndefinedFunctionError) function nil.id/0 is undefined
        nil.id()
        (doorman 0.6.2) lib/login/session.ex:12: Doorman.Login.Session.login/2
        (chatter 0.1.0) lib/chatter_web/controllers/session_controller.ex:11: ChatterWeb.SessionController.create/2
        (chatter 0.1.0) lib/chatter_web/controllers/session_controller.ex:1: ChatterWeb.SessionController.action/2
        (chatter 0.1.0) lib/chatter_web/controllers/session_controller.ex:1: ChatterWeb.SessionController.phoenix_controller_pipeline/2
        (phoenix 1.5.6) lib/phoenix/router.ex:352: Phoenix.Router.__call__/2
        (chatter 0.1.0) lib/chatter_web/endpoint.ex:1: ChatterWeb.Endpoint.plug_builder_call/2
        (chatter 0.1.0) lib/plug/debugger.ex:132: ChatterWeb.Endpoint."call (overridable 3)"/2
        (chatter 0.1.0) lib/chatter_web/endpoint.ex:1: ChatterWeb.Endpoint.call/2
        (phoenix 1.5.6) lib/phoenix/endpoint/cowboy2_handler.ex:65: Phoenix.Endpoint.Cowboy2Handler.init/4
        (cowboy 2.8.0) /home/matt/prog/chatter/deps/cowboy/src/cowboy_handler.erl:37: :cowboy_handler.execute/2
        (cowboy 2.8.0) /home/matt/prog/chatter/deps/cowboy/src/cowboy_stream_h.erl:300: :cowboy_stream_h.execute/3
        (cowboy 2.8.0) /home/matt/prog/chatter/deps/cowboy/src/cowboy_stream_h.erl:291: :cowboy_stream_h.request_process/3
        (stdlib 3.13.2) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="194612" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/test-driven-development-with-phoenix-self-published-free/35154/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-194612" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="194612"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #22"></div>
  </section>
</div>
    <div class="postbit" id="194718" data-post-id="194718">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="germsvel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/germsvel/120/26845_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  germsvel
                      <span class="op-star" title="Thread Starter">
                        <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                      </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks for letting me know about these. I’ll update the syntax highlighting for the first, and look into what might be causing the second.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="194718" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/test-driven-development-with-phoenix-self-published-free/35154/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-194718" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="194718"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #23"></div>
  </section>
</div>
    <div class="postbit" id="194776" data-post-id="194776">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="triad" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/triad/120/20797_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  triad
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thank you for sharing your work.<br>
Do you recommend this for new folks (with some programming experience) as well?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="194776" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/test-driven-development-with-phoenix-self-published-free/35154/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-194776" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="194776"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #24"></div>
  </section>
</div>
    <div class="postbit" id="194782" data-post-id="194782">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="slouchpie" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/slouchpie/120/34819_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  slouchpie
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I do. If you are new to Elixir and Phoenix, this is a good place to start.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="194782" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/test-driven-development-with-phoenix-self-published-free/35154/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-194782" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="194782"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #25"></div>
  </section>
</div>
    <div class="postbit" id="194794" data-post-id="194794">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="mstibbard" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mstibbard/120/39678_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  mstibbard
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Yes I think this is a fantastic place to start. I wish this were available earlier <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="194794" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/test-driven-development-with-phoenix-self-published-free/35154/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-194794" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="194794"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #26"></div>
  </section>
</div>
    <div class="postbit" id="194889" data-post-id="194889">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="germsvel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/germsvel/120/26845_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  germsvel
                      <span class="op-star" title="Thread Starter">
                        <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                      </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi <a class="mention" href="/u/triad" rel="nofollow">@triad</a>,</p>
<blockquote>
<p>Do you recommend this for new folks (with some programming experience) as well?</p>
</blockquote>
<p>I think it depends. I don’t cover a lot of topics in depth because I assume prior knowledge of Elixir and Phoenix.</p>
<p>That being said, if you already have prior programming experience, and you’re comfortable looking for documentation on things not covered, it could be a good way to learn Phoenix. It seems like others here think so too, so it might be worth a shot.</p>
<p>If you give it a try, I’d love to hear your thoughts on it.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="194889" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/test-driven-development-with-phoenix-self-published-free/35154/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-194889" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="194889"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #27"></div>
  </section>
</div>
    <div class="postbit" id="195161" data-post-id="195161">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dbaer" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dbaer/120/38458_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dbaer
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>This is really awesome, thank you for posting! I only wish I had started my current project with this methodology, I think it would have massively improved my testing flow.</p>
<p>My current branch has almost 400 tests, and that’s not even the bare minimum i <em>should</em> have to fully cover the logic bearing code. It is as much of a nightmare as one could expect.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="195161" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/test-driven-development-with-phoenix-self-published-free/35154/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-195161" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="195161"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #28"></div>
  </section>
</div>
    <div class="postbit" id="195384" data-post-id="195384">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="bdarla" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/bdarla/120/19471_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  bdarla
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I really enjoyed the accuracy in guiding the setup procedure! Thank you for this great help!</p>
<p>A little detail that some Mac users may face, which is related with the latest Mac OS versions is when getting the following error:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">“chromedriver” cannot be opened because the developer cannot be verified.
</code></pre>
<p>I have addressed this issue by running:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">xattr -d com.apple.quarantine &lt;pathto/chromedriver&gt;
</code></pre>
<p>I am not sure if it is safe in general, but I trusted that chromedriver in particular is not dangerous.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="195384" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/test-driven-development-with-phoenix-self-published-free/35154/30">Post #29</a>
	                </div>
	            </div>
              <div id="likers-container-195384" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="195384"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #29"></div>
  </section>
</div>
    <div class="postbit" id="196479" data-post-id="196479">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="germsvel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/germsvel/120/26845_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  germsvel
                      <span class="op-star" title="Thread Starter">
                        <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                      </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group quote-modified" data-username="mstibbard" data-post="23" data-topic="35154">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mstibbard/48/39678_2.png" class="avatar"> mstibbard:</div>
<blockquote>
<p>At the end of chapter 9 (creating users) if you run the server and try to create a user you will get the following error despite all tests passing.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">[debug] Processing with ChatterWeb.SessionController.create/2
  Parameters: %{"_csrf_token" =&gt; "AWNgFCMXGTFbTTM4MTwCITsMDzkwCCdQw-TpIomu4yZusykgM9PifMb2", "email" =&gt; "test@test.com", "password" =&gt; "[FILTERED]"}
  Pipelines: [:browser]
[debug] QUERY OK source="users" db=0.8ms queue=1.3ms idle=1252.9ms
SELECT u0."id", u0."email", u0."hashed_password", u0."session_secret", u0."inserted_at", u0."updated_at" FROM "users" AS u0 WHERE (u0."email" = $1) ["test@test.com"]

Request: POST /sessions
** (exit) an exception was raised:
    ** (UndefinedFunctionError) function nil.id/0 is undefined
</code></pre>
</blockquote>
</aside>
<p>I finally got a chance to look into this. I realized that in the authentication chapter, we never test the case when someone enters an incorrect email/password combination.</p>
<p>So the error you saw happens because we’re assuming that <code>Doorman.authenticate(email, password)</code> returns a <code>user</code>. But if the <code>email</code> or <code>password</code> are incorrect, it returns <code>nil</code>, so we get a call to <code>nil</code>.id` later.</p>
<p>Thanks for catching this. I’ll have to update the Authentication chapter to test that case.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="196479" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/test-driven-development-with-phoenix-self-published-free/35154/31">Post #30</a>
	                </div>
	            </div>
              <div id="likers-container-196479" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="196479"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #30"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/35154/load_more?page=4">Load more posts (14 remaining)</a>
</div></template></turbo-stream>