-
-
Save gogogarrett/0a6122a8242539325c9e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#= require support/ember-qunit | |
emq.globalize() | |
WF.setupForTesting() | |
WF.injectTestHelpers() | |
setResolver Ember.DefaultResolver.create(namespace: WF) | |
moduleFor "controller:activity", "Activity Controller" | |
test "does things", -> | |
# get the controller instance | |
ctrl = @subject() | |
Ember.run -> | |
lesson = ctrl.store.createRecord('lesson', {id: 5}) | |
activity = ctrl.store.createRecord('activity', {id: '1_1', lesson: lesson}) | |
ctrl.set 'model', activity | |
equal ctrl.get("id"), "1_1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#= require support/ember-qunit | |
emq.globalize() | |
WF.setupForTesting() | |
WF.injectTestHelpers() | |
setResolver Ember.DefaultResolver.create(namespace: WF) | |
moduleFor "controller:activity", "Activity Controller", { | |
# setup: -> | |
# App.inject('component', 'store', 'store:main'); | |
# # store = @store() | |
# console.log @get('store') | |
# lesson = WF.Lesson.createRecord({id: 5}) | |
# activity = WF.Activity.createRecord({id: '1_1'}) | |
# # activity = store.createRecord('activity', {id: '1_1', lesson: lesson}) | |
} | |
test "does things", -> | |
ctrl = @subject() | |
console.log ctrl.get('store') | |
Ember.run -> | |
ctrl.set 'model', activity | |
equal ctrl.get("id"), "1_1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment