# HG changeset patch # User nowmad@nowmads-macbook-pro.local # Date 1449762471 -3600 # Node ID 9887379e627f9e816f98ad0dcb7591874d4d54e5 # Parent c693e8673d5b6e991582d6e259d3f0e41643227e add sound model diff -r c693e8673d5b -r 9887379e627f cms/app-client/app/models/sound.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cms/app-client/app/models/sound.js Thu Dec 10 16:47:51 2015 +0100 @@ -0,0 +1,37 @@ +import DS from 'ember-data'; + +var Sound = DS.Model.extend({ + name: DS.attr('string'), + audio: DS.attr('url') +}); + +Sound.reopenClass({ + FIXTURES: [ + { + id: 1, + name: "Sound 1", + location: "france", + language: "alsacien", + datetime: 1990, + audio: "http://sound1.mp3" + }, + { + id: 2, + name: "Sound 2", + location: "france", + language: "breton", + datetime: 1965, + audio: "http://sound2.mp3" + }, + { + id: 3, + name: "Sound 3", + location: "spain", + language: "judeo-espagnol", + datetime: 2002, + audio: "http://sound3.mp3" + } + ] +}); + +export default Sound; diff -r c693e8673d5b -r 9887379e627f cms/app-client/tests/unit/models/sound-test.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cms/app-client/tests/unit/models/sound-test.js Thu Dec 10 16:47:51 2015 +0100 @@ -0,0 +1,12 @@ +import { moduleForModel, test } from 'ember-qunit'; + +moduleForModel('sound', 'Unit | Model | sound', { + // Specify the other units that are required for this test. + needs: [] +}); + +test('it exists', function(assert) { + var model = this.subject(); + // var store = this.store(); + assert.ok(!!model); +}); diff -r c693e8673d5b -r 9887379e627f cms/app-client/tests/unit/routes/sound-test.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cms/app-client/tests/unit/routes/sound-test.js Thu Dec 10 16:47:51 2015 +0100 @@ -0,0 +1,11 @@ +import { moduleFor, test } from 'ember-qunit'; + +moduleFor('route:sound', 'Unit | Route | sound', { + // Specify the other units that are required for this test. + // needs: ['controller:foo'] +}); + +test('it exists', function(assert) { + var route = this.subject(); + assert.ok(route); +});