mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 00:11:49 +03:00
e74e2e039e
no issue - switch `jscs` and `jshint` inline config to `eslint` config - fix eslint errors, predominantly in tests where the config now the main app config more closely
27 lines
801 B
JavaScript
27 lines
801 B
JavaScript
/* jshint expr:true */
|
|
import {expect} from 'chai';
|
|
import {describeModule, it} from 'ember-mocha';
|
|
|
|
describeModule(
|
|
'transform:twitter-url-user',
|
|
'Unit: Transform: twitter-url-user',
|
|
{},
|
|
function() {
|
|
it('deserializes twitter url', function () {
|
|
let transform = this.subject();
|
|
let serialized = '@testuser';
|
|
let result = transform.deserialize(serialized);
|
|
|
|
expect(result).to.equal('https://twitter.com/testuser');
|
|
});
|
|
|
|
it('serializes url to twitter username', function () {
|
|
let transform = this.subject();
|
|
let deserialized = 'https://twitter.com/testuser';
|
|
let result = transform.serialize(deserialized);
|
|
|
|
expect(result).to.equal('@testuser');
|
|
});
|
|
}
|
|
);
|