Assert on result of Task.start_link/1

This commit is contained in:
Felipe Sere
2016-03-20 16:23:44 +00:00
parent f564927751
commit 6e8845cb51
2 changed files with 3 additions and 2 deletions

View File

@@ -8,7 +8,8 @@ defmodule Tasks do
end end
koan "if you don't need a result, use start_link/1" do koan "if you don't need a result, use start_link/1" do
{:ok, _pid} = Task.start_link(fn -> 1+1 end) {result, _pid} = Task.start_link(fn -> 1+1 end)
assert result == :__
end end
koan "yield returns nothing if the task isn't done yet" do koan "yield returns nothing if the task isn't done yet" do

View File

@@ -222,7 +222,7 @@ defmodule KoansHarnessTest do
test "Tasks" do test "Tasks" do
answers = [ answers = [
10, 10,
:todo, :ok,
nil, nil,
nil, nil,
9, 9,