mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 13:22:39 +03:00
a85f5fae35
no issue - fix lint errors in lib/gh-koenig - fix ghost:base eslint errors - update ember plugin refs, remove ember-suave plugin refs - remove old jshint refs - add `lint:js` script - switch to `eslint-plugin-ghost` extending `plugin:ghost/ember`
23 lines
757 B
JavaScript
23 lines
757 B
JavaScript
import {describe, it} from 'mocha';
|
|
import {expect} from 'chai';
|
|
import {setupTest} from 'ember-mocha';
|
|
|
|
describe('Unit: Transform: facebook-url-user', function () {
|
|
setupTest('transform:facebook-url-user', {});
|
|
it('deserializes facebook url', function () {
|
|
let transform = this.subject();
|
|
let serialized = 'testuser';
|
|
let result = transform.deserialize(serialized);
|
|
|
|
expect(result).to.equal('https://www.facebook.com/testuser');
|
|
});
|
|
|
|
it('serializes url to facebook username', function () {
|
|
let transform = this.subject();
|
|
let deserialized = 'https://www.facebook.com/testuser';
|
|
let result = transform.serialize(deserialized);
|
|
|
|
expect(result).to.equal('testuser');
|
|
});
|
|
});
|