device_cloud 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
data/lib/device_cloud/version.rb
CHANGED
@@ -1,19 +1,24 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe DeviceCloud::PushNotification::DataNotification do
|
4
|
-
let(:
|
4
|
+
let(:raw_file_data) do
|
5
5
|
{
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
"id" => {
|
7
|
+
"fdPath" => " /db/4044_MadGlory_Interactive/00000000-00000000-001395FF-FF0E6012/alert/",
|
8
|
+
"fdName" => "foo-0966595cdcdd11e2abf50013950e6012.json"
|
9
9
|
},
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
"fdLastModifiedDate" => "2013-06-24T14:52:55.421Z",
|
11
|
+
"fdSize" => 156,
|
12
|
+
"fdContentType" => "application/json",
|
13
|
+
"fdData" => "eyJ2YWx1ZSI6IHt9LCAiY2xhc3MiOiAiYWxlcnQiLCAicXVldWVkX2R0IjogIjIwMTMtMDYtMjRUMTQ6NDc6NDdaIiwgInR5cGUiOiAiZm9vIiwgImlkIjogIjA5NjY1OTVjZGNkZDExZTJhYmY1MDAxMzk1MGU2MDEyIiwgImRldmljZV9pZCI6ICJtOjAwMTM5NTBFNjAxMiJ9",
|
14
|
+
"fdArchive" => false,
|
15
|
+
"cstId" => 4044,
|
16
|
+
"fdType" => "file",
|
17
|
+
"fdCreatedDate" => "2013-06-24T14:52:55.421Z"
|
14
18
|
}
|
15
19
|
end
|
16
|
-
|
20
|
+
|
21
|
+
let(:file_data) { DeviceCloud::PushNotification::Message::FileData.new raw_file_data }
|
17
22
|
|
18
23
|
subject { DeviceCloud::PushNotification::DataNotification.new file_data }
|
19
24
|
|
@@ -27,4 +32,8 @@ describe DeviceCloud::PushNotification::DataNotification do
|
|
27
32
|
expect(handled_data).to eq subject
|
28
33
|
end
|
29
34
|
end
|
35
|
+
|
36
|
+
describe "#raw_data" do
|
37
|
+
its(:raw_data) { should eq raw_file_data['fdData'] }
|
38
|
+
end
|
30
39
|
end
|
data/spec/version_spec.rb
CHANGED