Skip to content

Commit

Permalink
Add new js tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jefersonalves committed Dec 12, 2017
1 parent eee7cd8 commit d486f50
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions quero_cultura/static/js/spec/mapSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,23 @@ describe('updateFeed', function(){
expect(recent_markers[0]["city"]).toEqual('')
expect(recent_markers[0]["state"]).toEqual('')
});
});

describe('fitBounds', function(){
it('should focus on marker selected', function(){
var latitude = 0
var longitude = 0

spyOn(map, 'fitBounds')
focusOnMarker(latitude, longitude)
expect(map.fitBounds).toHaveBeenCalled()
})
});

describe('formatName', function(){
it('should format name blank', function(){
var name = ''
teste = formatName(name)
expect(teste).toEqual('--------')
});
});

0 comments on commit d486f50

Please sign in to comment.