Simplify content type shown in dir lists
This commit is contained in:
11
tests/unit/utils/simple-content-type-test.js
Normal file
11
tests/unit/utils/simple-content-type-test.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import simpleContentType from 'inspektor/utils/simple-content-type';
|
||||
import { module, test } from 'qunit';
|
||||
|
||||
module('Unit | Utility | simple content type');
|
||||
|
||||
test('it removes the charset portion', function(assert) {
|
||||
let type = 'application/json; charset=UTF-8';
|
||||
let result = simpleContentType(type);
|
||||
|
||||
assert.equal(result, 'application/json');
|
||||
});
|
||||
Reference in New Issue
Block a user