FEATURE: Webhooks.

This commit is contained in:
Erick Guan
2016-06-15 19:49:57 +02:00
committed by Guo Xiang Tan
parent 1f70fc9e11
commit 9ce61b4586
58 changed files with 1582 additions and 38 deletions

View File

@ -2,6 +2,7 @@
import { blank } from 'helpers/qunit-helpers';
import {
emailValid,
extractDomainFromUrl,
isAnImage,
avatarUrl,
allowsAttachments,
@ -21,6 +22,13 @@ test("emailValid", function() {
ok(emailValid('bob@EXAMPLE.com'), "allows upper case in the email domain");
});
test("extractDomainFromUrl", function() {
equal(extractDomainFromUrl('http://meta.discourse.org:443/random'), 'meta.discourse.org', "extract domain name from url");
equal(extractDomainFromUrl('meta.discourse.org:443/random'), 'meta.discourse.org', "extract domain regardless of scheme presence");
equal(extractDomainFromUrl('http://192.168.0.1:443/random'), '192.168.0.1', "works for IP address");
equal(extractDomainFromUrl('http://localhost:443/random'), 'localhost', "works for localhost");
});
var validUpload = validateUploadedFiles;
test("validateUploadedFiles", function() {