Skip to content

Commit

Permalink
Merge 654656d into dabb09b
Browse files Browse the repository at this point in the history
  • Loading branch information
williambelle committed Jan 23, 2017
2 parents dabb09b + 654656d commit 542d52a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/lib/index.js
Expand Up @@ -9,6 +9,7 @@ exports.isHONcodeCertified = function(url) {
return HONcodeCertificationList.getHONcodeCertificationList().then(
function(hash) {
// Prepare url
url = HONcodeUtils.addTrailingSlash(url);
url = HONcodeUtils.formatUrl(url);
var listUrls = HONcodeUtils.buildUrlToCheck(url);

Expand Down
11 changes: 10 additions & 1 deletion test/test.js
Expand Up @@ -6,7 +6,7 @@ var isHONcodeCertified = require('../src/lib/index.js');
describe('is HONcode Certified', function() {
this.timeout(15000);

it('should return true for webmd.com', function(done) {
it('should return true for webmd.com/', function(done) {
isHONcodeCertified.isHONcodeCertified('http://www.webmd.com/').then(
function(isCertified) {
isCertified.should.equal(true);
Expand All @@ -15,6 +15,15 @@ describe('is HONcode Certified', function() {
);
});

it('should return true for webmd.com', function(done) {
isHONcodeCertified.isHONcodeCertified('http://www.webmd.com').then(
function(isCertified) {
isCertified.should.equal(true);
done();
}
);
});

it('should return false for playboy.com', function(done) {
isHONcodeCertified.isHONcodeCertified('http://www.playboy.com/').then(
function(isCertified) {
Expand Down

0 comments on commit 542d52a

Please sign in to comment.