device-cloud 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
data/lib/device_cloud/version.rb
CHANGED
@@ -42,6 +42,7 @@ describe DeviceCloud::DeviceCore do
|
|
42
42
|
<dpZigbeeCapabilities>383</dpZigbeeCapabilities>
|
43
43
|
<dpCapabilities>68154</dpCapabilities>
|
44
44
|
<grpPath>IVX</grpPath>
|
45
|
+
<dpUserMetaData>{}</dpUserMetaData>
|
45
46
|
<dpLastDisconnectTime>2013-11-18T19:22:51.067Z</dpLastDisconnectTime>
|
46
47
|
</DeviceCore>
|
47
48
|
<DeviceCore>
|
@@ -140,4 +141,17 @@ describe DeviceCloud::DeviceCore do
|
|
140
141
|
end
|
141
142
|
end
|
142
143
|
|
144
|
+
describe "#metadata" do
|
145
|
+
it "returns the user defined metadata for the device" do
|
146
|
+
expect(device.metadata).to eql "{}"
|
147
|
+
end
|
148
|
+
|
149
|
+
context "Metadata is not present" do
|
150
|
+
subject(:device) { DeviceCloud::DeviceCore.parse(xml).last }
|
151
|
+
|
152
|
+
it "will return an empty string" do
|
153
|
+
expect(device.metadata).to eql ""
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
143
157
|
end
|