mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-23 00:29:50 +02:00
Merge pull request #2681 from frewsxcv/patch-1
Use HTTPS if location protocol is HTTPS in iD.Connection
This commit is contained in:
@@ -2,13 +2,25 @@ describe('iD.Connection', function () {
|
||||
var c;
|
||||
|
||||
beforeEach(function () {
|
||||
c = new iD.Connection({});
|
||||
c = new iD.Connection();
|
||||
});
|
||||
|
||||
it('is instantiated', function () {
|
||||
expect(c).to.be.ok;
|
||||
});
|
||||
|
||||
it('allows insecure connections', function () {
|
||||
expect(c.changesetURL(2)).to.match(/^http:/);
|
||||
|
||||
c = new iD.Connection(false);
|
||||
expect(c.changesetURL(2)).to.match(/^http:/);
|
||||
});
|
||||
|
||||
it('allows secure connections', function () {
|
||||
c = new iD.Connection(true);
|
||||
expect(c.changesetURL(2)).to.match(/^https:/);
|
||||
});
|
||||
|
||||
describe('#changesetUrl', function() {
|
||||
it('provides a changeset url', function() {
|
||||
expect(c.changesetURL(2)).to.eql('http://www.openstreetmap.org/changeset/2');
|
||||
|
||||
Reference in New Issue
Block a user