Updated password strings

This commit is contained in:
Eric Anderson
2017-07-17 21:15:50 -05:00
parent c5a332a2f8
commit 3f1eb8f397
2 changed files with 3 additions and 3 deletions

View File

@@ -119,13 +119,13 @@ defmodule GenServers do
koan "The handle_cast callback handles asynchronous messages" do koan "The handle_cast callback handles asynchronous messages" do
{:ok, pid} = GenServer.start_link(Laptop, "3kr3t!") {:ok, pid} = GenServer.start_link(Laptop, "3kr3t!")
GenServer.cast(pid, {:change_password, "3kr3t!", "Hello"}) GenServer.cast(pid, {:change_password, "3kr3t!", "73x7!n9"})
assert GenServer.call(pid, :get_password) == ___ assert GenServer.call(pid, :get_password) == ___
end end
koan "Handlers can also return error responses" do koan "Handlers can also return error responses" do
{:ok, pid} = GenServer.start_link(Laptop, "3kr3t!") {:ok, pid} = GenServer.start_link(Laptop, "3kr3t!")
assert GenServer.call(pid, {:unlock, 2017}) == ___ assert GenServer.call(pid, {:unlock, "81u3pr!n7"}) == ___
end end
koan "Referencing processes by their PID gets old pretty quickly, so let's name them" do koan "Referencing processes by their PID gets old pretty quickly, so let's name them" do

View File

@@ -9,7 +9,7 @@ defmodule GenServersTests do
"3kr3t!", "3kr3t!",
{:multiple, ["Apple Inc.", "MacBook Pro"]}, {:multiple, ["Apple Inc.", "MacBook Pro"]},
{:multiple, [["2.9 GHz Intel Core i5"], 8192, :intel_iris_graphics]}, {:multiple, [["2.9 GHz Intel Core i5"], 8192, :intel_iris_graphics]},
"Hello", "73x7!n9",
{:error, "Incorrect password!"}, {:error, "Incorrect password!"},
"Congrats! Your process was successfully named.", "Congrats! Your process was successfully named.",
{:ok, "Laptop unlocked!"}, {:ok, "Laptop unlocked!"},