mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-12 00:31:21 -05:00
45 lines
1,013 B
CoffeeScript
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()
|
|
|
|
|
|
|
|
|