Skip to content

Commit

Permalink
Fix incorrect assertion on map test
Browse files Browse the repository at this point in the history
KeyError is raised instead of an ArgumentError when trying to use
pattern matching to update a map key that doesn't exist.
  • Loading branch information
dgarlitt committed Dec 26, 2015
1 parent fe664a8 commit 913e970
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 05-map.exs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ defmodule MapTest do
# You can only update existing keys in this way
assert %{sample | foo: 'bob'} == %{foo: 'bob', baz: 'quz'}
# It doesn't work if you want to add new keys
assert_raise ArgumentError, fn ->
assert_raise KeyError, fn ->
%{sample | far: 'bob'}
end
end
Expand Down

0 comments on commit 913e970

Please sign in to comment.