Ghost/core/client/tests/unit/services/config-test.js
Kevin Ansfield 3d6856614f Use es6 across client and add ember-suave to enforce rules
no issue
- add ember-suave dependency
- upgrade grunt-jscs dependency
- add a new .jscsrc for the client's tests directory that extends from client's base .jscsrc
- separate client tests in Gruntfile jscs task so they pick up the test's .jscsrc
- standardize es6 usage across client
2015-11-30 10:41:01 +00:00

35 lines
866 B
JavaScript

/* jshint expr:true */
import { expect } from 'chai';
import {
describeModule,
it
} from 'ember-mocha';
import Ember from 'ember';
describeModule(
'service:config',
'Unit: Service: config',
{
// Specify the other units that are required for this test.
// needs: ['service:foo']
},
function () {
// Replace this with your real tests.
it('exists', function () {
const service = this.subject();
expect(service).to.be.ok;
});
it('correctly parses a client secret', function () {
Ember.$('<meta>').attr('name', 'env-clientSecret')
.attr('content', '23e435234423')
.appendTo('head');
const service = this.subject();
expect(service.get('clientSecret')).to.equal('23e435234423');
});
}
);