Created
March 27, 2018 09:55
-
-
Save haingdc/9cf3452c60a3b9c78b1d30d685a1c562 to your computer and use it in GitHub Desktop.
get start with tdd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// flickr-fetcher-spec.js | |
describe('#photoObjToURL()', function() { | |
it('should take a photo object from Flickr and return a string', function() { | |
var input = { | |
id: '24770505034', | |
owner: '97248275@N03', | |
secret: '31a9986429', | |
server: '1577', | |
farm: 2, | |
title: '20160229090898', | |
ispublic: 1, | |
isfriend: 0, | |
isfamily: 0 | |
}; | |
var expected = 'https://farm2.staticflickr.com/1577/24770505034_31a9986429_b.jpg'; | |
var actual = FlickrFetcher.photoObjToURL(input); | |
expect(actual).to.eql(expected); | |
input = { | |
id: '24770504484', | |
owner: '97248275@N03', | |
secret: '69dd90d5dd', | |
server: '1451', | |
farm: 2, | |
title: '20160229090903', | |
ispublic: 1, | |
isfriend: 0, | |
isfamily: 0 | |
}; | |
expected = 'https://farm2.staticflickr.com/1451/24770504484_69dd90d5dd_b.jpg'; | |
actual = FlickrFetcher.photoObjToURL(input); | |
expect(actual).to.eql(expected); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment