sugarcube 0.20.19 → 0.20.20
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/sugarcube/notifications.rb +1 -1
- data/lib/sugarcube/version.rb +1 -1
- data/spec/notification_spec.rb +16 -6
- metadata +1 -1
data/Gemfile.lock
CHANGED
data/lib/sugarcube/version.rb
CHANGED
data/spec/notification_spec.rb
CHANGED
@@ -47,12 +47,22 @@ describe "Notifications" do
|
|
47
47
|
@notification_tester_object.object.should == @object
|
48
48
|
end
|
49
49
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
50
|
+
describe "should send userInfo" do
|
51
|
+
it 'should return values' do
|
52
|
+
@notification.post_notification(@object, key: :value)
|
53
|
+
@notification_tester_object.notified?.should == true
|
54
|
+
@notification_tester_object.notification.should != nil
|
55
|
+
@notification_tester_object.object.should == @object
|
56
|
+
@notification_tester_object.notification[:key].should == :value
|
57
|
+
end
|
58
|
+
|
59
|
+
it "should return nil if userInfo wasn't sent" do
|
60
|
+
@notification.post_notification(@object)
|
61
|
+
@notification_tester_object.notified?.should == true
|
62
|
+
@notification_tester_object.notification.should != nil
|
63
|
+
@notification_tester_object.object.should == @object
|
64
|
+
@notification_tester_object.notification[:key].should == nil
|
65
|
+
end
|
56
66
|
end
|
57
67
|
|
58
68
|
after do
|