Ghost/ghost/admin/tests/unit/transforms/twitter-url-user-test.js
Kevin Ansfield a85f5fae35 Switch to eslint-plugin-ghost extending plugin:ghost/ember
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`
2018-01-12 12:17:56 +00:00

23 lines
745 B
JavaScript

import {describe, it} from 'mocha';
import {expect} from 'chai';
import {setupTest} from 'ember-mocha';
describe('Unit: Transform: twitter-url-user', function () {
setupTest('transform:twitter-url-user', {});
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');
});
});