codecombat/spec/server/unit/patch.spec.coffee
Scott Erickson 23e3821e24 Switch from jasmine-node to jasmine, run server tests on a single process
This collapses the difference between master and single-process-server-tests, to
remove some larger fixtures files that were in that feature branch.
2015-12-09 14:27:10 -08:00

45 lines
1,013 B
CoffeeScript

require '../common'
describe 'schema methods', ->
patch = new Patch
commitMessage: 'Accept this patch!'
editPath: '/who/knows/yes'
target:
id:null
collection: 'article'
delta:
"scripts":
"0":
"noteChain":
"1":
"sprites":
"0":
"say":
"i18n":
"nl-BE": [ "text": "aaahw yeahh" ]
"_t": "a"
"_t": "a"
"_t": "a"
"thangs":
"111": [
"components": [
"config": {
"stateless": true
}
]
]
"_t": "a"
it 'is translation patch', ->
expect(patch.isTranslationPatch()).toBeTruthy()
patch.set 'delta.scripts', undefined
expect(patch.isTranslationPatch()).toBeFalsy()
it 'is miscellaneous patch', ->
expect(patch.isMiscPatch()).toBeTruthy()
patch.set 'delta.thangs', undefined
expect(patch.isMiscPatch()).toBeFalsy()