User specs in the green
This commit is contained in:
@@ -85,13 +85,13 @@ module SpecEmberHelpers
|
||||
|
||||
def ember_find(typeKey, id)
|
||||
h = page.evaluate_script <<-SCRIPT
|
||||
(MozoUser || App).__container__.lookup('store:main').all('#{typeKey}').findBy('id', '#{id}').serialize()
|
||||
(MozoUser || App).__container__.lookup('service:store').peekRecord('#{typeKey}', '#{id}').toJSON()
|
||||
SCRIPT
|
||||
end
|
||||
|
||||
def ember_all(typeKey)
|
||||
h = page.evaluate_script <<-SCRIPT
|
||||
(MozoUser || App).__container__.lookup('store:main').all('#{typeKey}').invoke('serialize')
|
||||
(MozoUser || App).__container__.lookup('service:store').peekAll('#{typeKey}').map(function(r){ result = r.toJSON(); result['id'] = r.id; return result })
|
||||
SCRIPT
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user