grocer 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/lib/grocer/notification.rb +1 -1
- data/lib/grocer/version.rb +1 -1
- data/spec/grocer/notification_spec.rb +11 -1
- metadata +4 -4
data/CHANGELOG.md
CHANGED
data/lib/grocer/notification.rb
CHANGED
data/lib/grocer/version.rb
CHANGED
@@ -49,9 +49,19 @@ describe Grocer::Notification do
|
|
49
49
|
context 'missing payload' do
|
50
50
|
let(:payload_options) { Hash.new }
|
51
51
|
|
52
|
-
it 'raises an error when
|
52
|
+
it 'raises an error when none of alert, badge, or custom are specified' do
|
53
53
|
-> { notification.to_bytes }.should raise_error(Grocer::NoPayloadError)
|
54
54
|
end
|
55
|
+
|
56
|
+
[{alert: 'hi'}, {badge: 1}, {custom: {a: 'b'}}].each do |payload|
|
57
|
+
context "when #{payload.keys.first} exists, but not any other payload keys" do
|
58
|
+
let(:payload_options) { payload }
|
59
|
+
|
60
|
+
it 'does not raise an error' do
|
61
|
+
-> { notification.to_bytes }.should_not raise_error
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
55
65
|
end
|
56
66
|
|
57
67
|
context 'oversized payload' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grocer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-
|
14
|
+
date: 2013-03-12 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rspec
|
@@ -170,7 +170,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
170
170
|
version: '0'
|
171
171
|
segments:
|
172
172
|
- 0
|
173
|
-
hash:
|
173
|
+
hash: 215139925189749573
|
174
174
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
175
175
|
none: false
|
176
176
|
requirements:
|
@@ -179,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
179
179
|
version: '0'
|
180
180
|
segments:
|
181
181
|
- 0
|
182
|
-
hash:
|
182
|
+
hash: 215139925189749573
|
183
183
|
requirements: []
|
184
184
|
rubyforge_project:
|
185
185
|
rubygems_version: 1.8.23
|