create scaffolding base on tags repo
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
sinon = require('sinon')
|
||||
chai = require('chai')
|
||||
should = chai.should()
|
||||
modulePath = "../../../app/js/NotificationsController.js"
|
||||
SandboxedModule = require('sandboxed-module')
|
||||
assert = require('assert')
|
||||
|
||||
user_id = "51dc93e6fb625a261300003b"
|
||||
notification_key = '123434'
|
||||
|
||||
describe 'Notifications controller', ->
|
||||
@@ -0,0 +1,30 @@
|
||||
sinon = require('sinon')
|
||||
chai = require('chai')
|
||||
should = chai.should()
|
||||
modulePath = "../../../app/js/Notifications.js"
|
||||
SandboxedModule = require('sandboxed-module')
|
||||
assert = require('assert')
|
||||
|
||||
user_id = "51dc93e6fb625a261300003b"
|
||||
notification_key = '123434'
|
||||
|
||||
describe 'creating a user', ->
|
||||
beforeEach ->
|
||||
self = @
|
||||
@findOneStub = sinon.stub()
|
||||
@findStub = sinon.stub()
|
||||
@saveStub = sinon.stub()
|
||||
@updateStub = sinon.stub()
|
||||
|
||||
@mongojs = =>
|
||||
notifications:
|
||||
update: self.mongojsUpdate
|
||||
find: @findStub
|
||||
findOne: @findOneStub
|
||||
save: @saveStub
|
||||
update: @updateStub
|
||||
|
||||
@repository = SandboxedModule.require modulePath, requires:
|
||||
'logger-sharelatex': log:->
|
||||
'settings-sharelatex': {}
|
||||
'mongojs':@mongojs
|
||||
Reference in New Issue
Block a user