Skip to content

Commit 66a5d11

Browse files
committed
Solved some deprecated jasmine calls
1 parent d6c48a5 commit 66a5d11

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

test/unit/eventsDirectiveSpec.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,9 @@ describe('Directive: leaflet', function() {
503503
expect(true).toBe(true);
504504
});
505505

506-
//
506+
//
507507
// ***************************************************************************
508-
//
508+
//
509509

510510
it('should broadcast path events (backward compatibility) from the rootscope if the event-broadcast does not have a path attribute',function() {
511511
//TODO: pending until problems resolved, see issue #137 in
@@ -710,14 +710,16 @@ describe('Directive: leaflet', function() {
710710
};
711711
expect(true).toBe(true);
712712
});
713-
714-
//
713+
714+
//
715715
// ***************************************************************************
716-
//
716+
//
717717

718718
it('should broadcast label events',function() {
719+
console.log("hola");
719720
spyOn($rootScope, '$broadcast');
720-
spyOn(leafletHelpers.LabelPlugin, 'isLoaded').andReturn(true);
721+
console.log("hola", leafletHelpers.LabelPlugin);
722+
spyOn(leafletHelpers.LabelPlugin, 'isLoaded').and.returnValue(true);
721723
L.Label = L.Class.extend({
722724
includes: L.Mixin.Events,
723725
});
@@ -758,6 +760,6 @@ describe('Directive: leaflet', function() {
758760

759761
$rootScope.$digest();
760762

761-
expect($rootScope.$broadcast.mostRecentCall.args[0]).toEqual('leafletDirectiveLabel.mouseover');
763+
expect($rootScope.$broadcast.calls.mostRecent().args[0]).toEqual('leafletDirectiveLabel.mouseover');
762764
});
763765
});

test/unit/markersDirectiveSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ describe('Directive: leaflet', function() {
101101
});
102102

103103
it('should bind label to main marker if message is given', function() {
104-
spyOn(leafletHelpers.LabelPlugin, 'isLoaded').andReturn(true);
104+
spyOn(leafletHelpers.LabelPlugin, 'isLoaded').and.returnValue(true);
105105
L.Label = L.Class.extend({
106106
includes: L.Mixin.Events,
107107
});

0 commit comments

Comments
 (0)