mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Merge branch 'rubenvereecken-server-test-fix'
This commit is contained in:
commit
7fd87f2605
6 changed files with 13 additions and 10 deletions
|
@ -1,5 +1,4 @@
|
||||||
mongoose = require('mongoose')
|
mongoose = require('mongoose')
|
||||||
plugins = require('../plugins/plugins')
|
|
||||||
jsonschema = require('../../app/schemas/models/achievement')
|
jsonschema = require('../../app/schemas/models/achievement')
|
||||||
log = require 'winston'
|
log = require 'winston'
|
||||||
|
|
||||||
|
@ -29,7 +28,9 @@ AchievementSchema.pre('save', (next) ->
|
||||||
next()
|
next()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
module.exports = Achievement = mongoose.model('Achievement', AchievementSchema)
|
||||||
|
|
||||||
|
plugins = require('../plugins/plugins')
|
||||||
|
|
||||||
AchievementSchema.plugin(plugins.NamedPlugin)
|
AchievementSchema.plugin(plugins.NamedPlugin)
|
||||||
AchievementSchema.plugin(plugins.SearchablePlugin, {searchable: ['name']})
|
AchievementSchema.plugin(plugins.SearchablePlugin, {searchable: ['name']})
|
||||||
|
|
||||||
module.exports = Achievement = mongoose.model('Achievement', AchievementSchema)
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ LevelComponentHandler = class LevelComponentHandler extends Handler
|
||||||
'description'
|
'description'
|
||||||
'code'
|
'code'
|
||||||
'js'
|
'js'
|
||||||
'language'
|
'codeLanguage'
|
||||||
'dependencies'
|
'dependencies'
|
||||||
'propertyDocumentation'
|
'propertyDocumentation'
|
||||||
'configSchema'
|
'configSchema'
|
||||||
|
|
|
@ -7,7 +7,7 @@ LevelSystemHandler = class LevelSystemHandler extends Handler
|
||||||
'description'
|
'description'
|
||||||
'code'
|
'code'
|
||||||
'js'
|
'js'
|
||||||
'language'
|
'codeLanguage'
|
||||||
'dependencies'
|
'dependencies'
|
||||||
'propertyDocumentation'
|
'propertyDocumentation'
|
||||||
'configSchema'
|
'configSchema'
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
mongoose = require('mongoose')
|
mongoose = require('mongoose')
|
||||||
Achievement = require('../achievements/Achievement')
|
Achievement = require('../achievements/Achievement')
|
||||||
EarnedAchievement = require '../achievements/EarnedAchievement'
|
EarnedAchievement = require '../achievements/EarnedAchievement'
|
||||||
User = require '../users/User'
|
|
||||||
LocalMongo = require '../../app/lib/LocalMongo'
|
LocalMongo = require '../../app/lib/LocalMongo'
|
||||||
util = require '../../app/lib/utils'
|
util = require '../../app/lib/utils'
|
||||||
log = require 'winston'
|
log = require 'winston'
|
||||||
|
@ -19,6 +18,8 @@ loadAchievements = ->
|
||||||
loadAchievements()
|
loadAchievements()
|
||||||
|
|
||||||
module.exports = AchievablePlugin = (schema, options) ->
|
module.exports = AchievablePlugin = (schema, options) ->
|
||||||
|
User = require '../users/User'
|
||||||
|
|
||||||
checkForAchievement = (doc) ->
|
checkForAchievement = (doc) ->
|
||||||
collectionName = doc.constructor.modelName
|
collectionName = doc.constructor.modelName
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
mongoose = require('mongoose')
|
mongoose = require('mongoose')
|
||||||
User = require('../users/User')
|
|
||||||
textSearch = require('mongoose-text-search')
|
textSearch = require('mongoose-text-search')
|
||||||
|
|
||||||
module.exports.MigrationPlugin = (schema, migrations) ->
|
module.exports.MigrationPlugin = (schema, migrations) ->
|
||||||
|
|
|
@ -6,7 +6,8 @@ describe '/file', ->
|
||||||
options = {
|
options = {
|
||||||
uri:url
|
uri:url
|
||||||
json: {
|
json: {
|
||||||
url: 'http://scotterickson.info/images/where-are-you.jpg'
|
# url: 'http://scotterickson.info/images/where-are-you.jpg'
|
||||||
|
url: 'http://fc07.deviantart.net/fs37/f/2008/283/5/1/Chu_Chu_Pikachu_by_angelishi.gif'
|
||||||
filename: 'where-are-you.jpg'
|
filename: 'where-are-you.jpg'
|
||||||
mimetype: 'image/jpeg'
|
mimetype: 'image/jpeg'
|
||||||
description: 'None!'
|
description: 'None!'
|
||||||
|
@ -20,7 +21,8 @@ describe '/file', ->
|
||||||
filename: 'ittybitty.data'
|
filename: 'ittybitty.data'
|
||||||
mimetype: 'application/octet-stream'
|
mimetype: 'application/octet-stream'
|
||||||
description: 'rando-info'
|
description: 'rando-info'
|
||||||
my_buffer_url: 'http://scotterickson.info/images/where-are-you.jpg'
|
# my_buffer_url: 'http://scotterickson.info/images/where-are-you.jpg'
|
||||||
|
my_buffer_url: 'http://fc07.deviantart.net/fs37/f/2008/283/5/1/Chu_Chu_Pikachu_by_angelishi.gif'
|
||||||
}
|
}
|
||||||
|
|
||||||
it 'preparing test : deletes all the files first', (done) ->
|
it 'preparing test : deletes all the files first', (done) ->
|
||||||
|
|
Loading…
Reference in a new issue