[25.8%] Test for Asset.device/1

pull/1185/head
Rick Carlino 2020-04-01 11:38:36 -05:00
parent 701141b0a3
commit bb4f910cfc
1 changed files with 7 additions and 0 deletions

View File

@ -15,4 +15,11 @@ defmodule FarmbotCore.AssetTest do
assert %RegimenInstance{} = Asset.new_regimen_instance!(event)
end
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
end