Combine keys and values map koans
This commit is contained in:
@@ -13,11 +13,8 @@ defmodule Maps do
|
||||
age: 27 }
|
||||
end
|
||||
|
||||
koan "You can get all the keys from the map" do
|
||||
koan "A map has keys and values" do
|
||||
assert Map.keys(@person) |> Enum.sort == :__
|
||||
end
|
||||
|
||||
koan "Or you can also get all the values from it" do
|
||||
assert Map.values(@person) |> Enum.sort == :__
|
||||
end
|
||||
|
||||
|
||||
@@ -86,8 +86,7 @@ defmodule KoansHarnessTest do
|
||||
test "Maps" do
|
||||
answers = [
|
||||
"Jon",
|
||||
[:age, :last_name, :name],
|
||||
[27, "Jon", "Snow"],
|
||||
{:multiple, [[:age, :last_name, :name], [27, "Jon", "Snow"]]},
|
||||
{:ok, 27},
|
||||
:error,
|
||||
{:ok, "Kayaking"},
|
||||
|
||||
Reference in New Issue
Block a user