Skip to content

Commit

Permalink
Don't flag google drive as an incompatible source (close #7545)
Browse files Browse the repository at this point in the history
  • Loading branch information
quincylvania committed Apr 28, 2020
1 parent 282e8de commit 9a13c68
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/validations/incompatible_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function validationIncompatibleSource() {
var type = 'incompatible_source';
var invalidSources = [
{
id:'google', regex:'google', exceptRegex: 'books.google|Google Books'
id:'google', regex:'google', exceptRegex: 'books.google|Google Books|drive.google|googledrive|Google Drive'
}
];

Expand Down
6 changes: 6 additions & 0 deletions test/spec/validations/incompatible_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ describe('iD.validations.incompatible_source', function () {
expect(issues).to.have.lengthOf(0);
});

it('ignores way with excepted source tag', function() {
createWay({ amenity: 'cafe', building: 'yes', name: 'Key Largo Café', source: 'Google drive'});
var issues = validate();
expect(issues).to.have.lengthOf(0);
});

it('flags way with incompatible source tag', function() {
createWay({ amenity: 'cafe', building: 'yes', name: 'Key Largo Café', source: 'Google Maps'});
var issues = validate();
Expand Down

0 comments on commit 9a13c68

Please sign in to comment.