Sort the result from #keys and #values to make the result more obvious.

This commit is contained in:
Felipe Sere
2016-04-06 22:05:48 +01:00
parent f0201b5faf
commit 96366991dc
2 changed files with 3 additions and 3 deletions

View File

@@ -10,11 +10,11 @@ defmodule Maps do
end
koan "You can get all the keys from the map" do
assert Map.keys(%{ :name => "Jon", :last_name => "Snow", :age => 27 }) == :__
assert Map.keys(%{ :name => "Jon", :last_name => "Snow", :age => 27 }) |> Enum.sort == :__
end
koan "Or you can also get all the values from it" do
assert Map.values(%{ :name => "Jon", :last_name => "Snow", :age => 27 }) == :__
assert Map.values(%{ :name => "Jon", :last_name => "Snow", :age => 27 }) |> Enum.sort == :__
end
koan "Fetching a value returns a tuple with ok when it exists" do