Combine Laptop Genserver examples to avoid process leaking issue

This commit is contained in:
Jay Hayes
2022-02-01 07:53:51 -06:00
parent ad5952c7ab
commit 20927cc1df
2 changed files with 3 additions and 8 deletions

View File

@@ -135,15 +135,11 @@ defmodule GenServers do
koan "Our server works but it's pretty ugly to use; so lets use a cleaner interface" do
Laptop.start_link("EL!73")
assert Laptop.unlock("EL!73") == ___
end
koan "Let's use the remaining functions in the external API" do
Laptop.start_link("EL!73")
{_, response} = Laptop.unlock("EL!73")
assert response == ___
assert Laptop.unlock("EL!73") == ___
Laptop.change_password("EL!73", "Elixir")
{_, response} = Laptop.unlock("EL!73")
assert response == ___