2017-10-16 18:20:05 -07:00
|
|
|
import {
|
|
|
|
lastSeenSuggestionInterval,
|
|
|
|
lowQualitySuggestionConfidenceThreshold,
|
2017-12-06 10:23:33 -08:00
|
|
|
formatAsCapitalizedStringWithSpaces
|
2017-10-16 18:20:05 -07:00
|
|
|
} from 'wherehows-web/constants/metadata-acquisition';
|
|
|
|
import { module, test } from 'qunit';
|
|
|
|
|
|
|
|
module('Unit | Utility | datasets/metadata acquisition');
|
|
|
|
|
|
|
|
test('lastSeenSuggestionInterval is a number', function(assert) {
|
|
|
|
assert.ok(typeof lastSeenSuggestionInterval === 'number');
|
|
|
|
});
|
|
|
|
module('Unit | Utility | datasets/metadata acquisition');
|
|
|
|
|
|
|
|
test('lowQualitySuggestionConfidenceThreshold is a number', function(assert) {
|
|
|
|
assert.ok(typeof lowQualitySuggestionConfidenceThreshold === 'number');
|
|
|
|
});
|
|
|
|
|
2017-12-06 10:23:33 -08:00
|
|
|
test('formatAsCapitalizedStringWithSpaces generates the correct display string', function(assert) {
|
|
|
|
[
|
2017-12-12 22:19:01 -08:00
|
|
|
['CONFIDENTIAL', 'Confidential'],
|
|
|
|
['LIMITED_DISTRIBUTION', 'Limited distribution'],
|
|
|
|
['HIGHLY_CONFIDENTIAL', 'Highly confidential']
|
2017-12-06 10:23:33 -08:00
|
|
|
].forEach(([source, target]) => {
|
|
|
|
assert.equal(formatAsCapitalizedStringWithSpaces(source), target, `correctly converts ${source}`);
|
|
|
|
});
|
|
|
|
});
|