mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #1228 from sharelatex/ja-fix-subscription-tests
Remove redundant sandboxed module require in tests GitOrigin-RevId: 957af70aacefed34f853549ef2357f59c01a4b3e
This commit is contained in:
parent
16e1980b41
commit
79a7a596b0
1 changed files with 1 additions and 24 deletions
|
@ -115,31 +115,8 @@ describe "SubscriptionController", ->
|
||||||
|
|
||||||
describe 'when user is not logged in', (done) ->
|
describe 'when user is not logged in', (done) ->
|
||||||
beforeEach (done) ->
|
beforeEach (done) ->
|
||||||
@UserGetter =
|
|
||||||
getUser: sinon.stub().callsArgWith(2, null, null)
|
|
||||||
@res.callback = done
|
@res.callback = done
|
||||||
@AuthenticationController =
|
@AuthenticationController.getLoggedInUserId = sinon.stub().returns(null)
|
||||||
getLoggedInUser: sinon.stub().callsArgWith(1, null, null)
|
|
||||||
getLoggedInUserId: sinon.stub().returns(null)
|
|
||||||
getSessionUser: sinon.stub().returns(null)
|
|
||||||
isUserLoggedIn: sinon.stub().returns(false)
|
|
||||||
@SubscriptionController = SandboxedModule.require modulePath, requires:
|
|
||||||
'../Authentication/AuthenticationController': @AuthenticationController
|
|
||||||
'./SubscriptionHandler': @SubscriptionHandler
|
|
||||||
"./PlansLocator": @PlansLocator
|
|
||||||
'./SubscriptionViewModelBuilder': @SubscriptionViewModelBuilder
|
|
||||||
"./LimitationsManager": @LimitationsManager
|
|
||||||
"../../infrastructure/GeoIpLookup":@GeoIpLookup
|
|
||||||
"logger-sharelatex":
|
|
||||||
log:->
|
|
||||||
warn:->
|
|
||||||
"settings-sharelatex": @settings
|
|
||||||
"./SubscriptionDomainHandler":@SubscriptionDomainHandler
|
|
||||||
"../User/UserGetter": @UserGetter
|
|
||||||
"./RecurlyWrapper": @RecurlyWrapper = {}
|
|
||||||
"./FeaturesUpdater": @FeaturesUpdater = {}
|
|
||||||
"./GroupPlansData": @GroupPlansData
|
|
||||||
|
|
||||||
@SubscriptionController.plansPage(@req, @res)
|
@SubscriptionController.plansPage(@req, @res)
|
||||||
|
|
||||||
it 'should not fetch the current user', (done) ->
|
it 'should not fetch the current user', (done) ->
|
||||||
|
|
Loading…
Reference in a new issue