TODO: Test on CI

pull/1185/head
Rick Carlino 2020-04-02 10:02:28 -05:00
parent 680f208e97
commit 10f90a9a91
2 changed files with 7 additions and 2 deletions

View File

@ -43,6 +43,6 @@ defmodule FarmbotCore.Asset.Supervisor do
AssetMonitor,
]
config = Application.get_env(:farmbot_ext, __MODULE__) || []
Keyword.get(config, :children, default)
Keyword.get(config, :children, default)
end
end

View File

@ -17,9 +17,14 @@ defmodule FarmbotCore.AssetTest do
end
test "Asset.device/1" do
# Update device...
assert nil == Asset.device(:ota_hour)
assert %FarmbotCore.Asset.Device{} = Asset.update_device!(%{ota_hour: 17})
assert 17 == Asset.device(:ota_hour)
end
test "update_farm_event!/2" do
farm_event = Asset.new_farm_event!(%{repeat: 7})
new_farm_event = Asset.update_farm_event!(farm_event, %{repeat: 3})
assert 3 == new_farm_event.repeat
end
end