Skip to content

Instantly share code, notes, and snippets.

@pkenway
Last active August 29, 2015 14:18
Show Gist options
  • Save pkenway/9e77ca425d91fe925482 to your computer and use it in GitHub Desktop.
Save pkenway/9e77ca425d91fe925482 to your computer and use it in GitHub Desktop.
Ember DRF adapter unit-test failure
import {
moduleFor,
test
} from 'ember-qunit';
moduleFor('adapter:application', 'ApplicationAdapter', {
// Specify the other units that are required for this test.
// needs: ['serializer:foo']
});
// Replace this with your real tests.
test('it exists', function(assert) {
var adapter = this.subject();
assert.ok(adapter);
});
import DRFAdapter from './drf';
import ENV from '../config/environment'
export default DRFAdapter.extend({
host: ENV.API_HOST,
namespace: ENV.API_NAMESPACE
});
'use strict';
//values needed for testing only
module.exports = function(environment, appConfig) {
var ENV = {
modulePrefix: 'merchant',
environment: environment,
baseURL: '/',
locationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
}
},
APP: {
API_NAMESPACE : 'api',
API_HOST : 'http://localhost:4200'
// Here you can pass flags/options to your application instance
// when it is created
}
};
return ENV;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment