In the first case the key is an atom, but in the second case it is a string.
You can do this on iex:
expected = HashDict.new([key: 12])
actual = Dict.put(HashDict.new, :key, 12)
Dict.equals? actual, expected # returns true
For more information visit: http://elixir-lang.org/docs/stable/