Skip to content

Commit

Permalink
Add test for summing values in a map
Browse files Browse the repository at this point in the history
  • Loading branch information
samjowen committed Dec 27, 2023
1 parent 71f1c72 commit f01a9b1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/day2/day2_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,14 @@ defmodule Day2Test do
test "it extracts integer from a string" do
assert Day2.extract_integer("21 meow 21") == 2121
end

test "it adds the values of a map together" do
map = %{
:red => 7,
:green => 8,
:blue => 14
}

assert Day2.sum_map(map) == 29
end
end

0 comments on commit f01a9b1

Please sign in to comment.