Skip to content

Commit

Permalink
Fix getting zipgateway.cfg params
Browse files Browse the repository at this point in the history
  • Loading branch information
mattludwigs committed Nov 5, 2019
1 parent c244480 commit 5ae4725
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/grizzly/zipgateway_cfg.ex
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ defmodule Grizzly.ZipgatewayCfg do
@doc """
Make a new `ZipgatewayCfg.t()` from the supplied options
"""
@spec new(keyword) :: t()
def new(opts \\ []) do
@spec new(map()) :: t()
def new(opts \\ %{}) do
opts =
Keyword.take(opts, [
Map.take(opts, [
:manufacturer_id,
:hardware_version,
:product_id,
Expand Down
2 changes: 1 addition & 1 deletion test/grizzly/zipgateway_cfg_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ defmodule Grizzly.ZipgatewayCfgTest do
ZipProductID = 1
"""

cfg = Grizzly.ZipgatewayCfg.new(product_id: 1)
cfg = Grizzly.ZipgatewayCfg.new(%{product_id: 1})

assert output == Grizzly.ZipgatewayCfg.to_string(cfg)
end
Expand Down

0 comments on commit 5ae4725

Please sign in to comment.