codecombat/test/demo/views/common/LevelSessionCodeView.demo.coffee

14 lines
465 B
CoffeeScript
Raw Normal View History

LevelSessionCodeView = require 'views/common/LevelSessionCodeView'
LevelSession = require 'models/LevelSession'
2016-01-07 12:40:35 -05:00
levelSessionData = require './level-session.fixture'
levelData = require './level.fixture';
module.exports = ->
session = new LevelSession(levelSessionData)
v = new LevelSessionCodeView({session:session})
request = jasmine.Ajax.requests.mostRecent()
2016-01-07 12:40:35 -05:00
request.respondWith({status: 200, responseText: JSON.stringify(levelData)})
v.render()
v