mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 16:42:17 +03:00
1520122483
no issue - https://github.com/emberjs/ember-mocha/blob/master/docs/migration.md#upgrading-to-the-new-testing-apis - deleted tests files which had no specific tests - migrated unskipped component unit tests to integration tests
24 lines
793 B
JavaScript
24 lines
793 B
JavaScript
import {describe, it} from 'mocha';
|
|
import {expect} from 'chai';
|
|
import {setupTest} from 'ember-mocha';
|
|
|
|
describe('Unit: Transform: facebook-url-user', function () {
|
|
setupTest();
|
|
|
|
it('deserializes facebook url', function () {
|
|
let transform = this.owner.lookup('transform:facebook-url-user');
|
|
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.owner.lookup('transform:facebook-url-user');
|
|
let deserialized = 'https://www.facebook.com/testuser';
|
|
let result = transform.serialize(deserialized);
|
|
|
|
expect(result).to.equal('testuser');
|
|
});
|
|
});
|