forked from sqlpad/sqlpad
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck-allowed-domains.js
More file actions
31 lines (28 loc) · 1.2 KB
/
check-allowed-domains.js
File metadata and controls
31 lines (28 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const assert = require('assert');
const checkAllowedDomains = require('../../lib/check-allowed-domains');
describe('lib/check-allowed-domains', function () {
it('allows email addresses matching any domain in the list', function () {
const allowedDomains = 'baz.com foo.bar.com';
});
it('disallows email addresses that do not match domains exactly', function () {
const allowedDomains = 'baz.com foo.bar.com';
assert.equal(
false
);
});
it('uses the last @ segment as the domain', function () {
const allowedDomains = 'baz.com';
assert.equal(
// Email addresses are allowed to contain multiple @ signs, as long as all
// of the @'s in the local part of the email address are enclosed in
// quotes. We need to make sure that we only treat the last @-delimited as
// the domain.
false
);
});
});