codecombat/test/demo/views/common/LevelSessionCodeView.demo.coffee
2016-01-07 09:40:35 -08:00

13 lines
465 B
CoffeeScript

LevelSessionCodeView = require 'views/common/LevelSessionCodeView'
LevelSession = require 'models/LevelSession'
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()
request.respondWith({status: 200, responseText: JSON.stringify(levelData)})
v.render()
v