spec/unit/map_spec.rb in ProMotion-1.0.4 vs spec/unit/map_spec.rb in ProMotion-1.1.0.rc1
- old
+ new
@@ -28,9 +28,31 @@
}
@map.add_annotation(ann)
@map.annotations.count.should == 6
end
+ it "should return custom annotation parameters" do
+ ann = {
+ longitude: -82.966093558105,
+ latitude: 35.092520895652,
+ title: "Custom",
+ another_value: "Mark"
+ }
+ @map.add_annotation(ann)
+ @map.annotations.last.another_value.should == "Mark"
+ end
+
+ it "should return nil for custom annotation parameters that don't exist" do
+ ann = {
+ longitude: -82.966093558105,
+ latitude: 35.092520895652,
+ title: "Custom",
+ another_value: "Mark"
+ }
+ @map.add_annotation(ann)
+ @map.annotations.last.another_value_fake.should == nil
+ end
+
it "should clear annotations" do
@map.clear_annotations
@map.annotations.count.should == 0
end