Update var name

This commit is contained in:
Alberto Fernández Capel 2018-07-11 11:50:14 +01:00
parent 4e8185d369
commit 3586fe8406

View file

@ -302,7 +302,7 @@ describe "LimitationsManager", ->
describe "hasGroupMembersLimitReached", ->
beforeEach ->
@user_id = "12312"
@subscriptionId = "12312"
@subscription =
membersLimit: 3
member_ids: ["", ""]
@ -312,21 +312,21 @@ describe "LimitationsManager", ->
it "should return true if the limit is hit (including members and invites)", (done)->
@SubscriptionLocator.getSubscription.callsArgWith(1, null, @subscription)
@LimitationsManager.hasGroupMembersLimitReached @user_id, (err, limitReached)->
@LimitationsManager.hasGroupMembersLimitReached @subscriptionId, (err, limitReached)->
limitReached.should.equal true
done()
it "should return false if the limit is not hit (including members and invites)", (done)->
@subscription.membersLimit = 4
@SubscriptionLocator.getSubscription.callsArgWith(1, null, @subscription)
@LimitationsManager.hasGroupMembersLimitReached @user_id, (err, limitReached)->
@LimitationsManager.hasGroupMembersLimitReached @subscriptionId, (err, limitReached)->
limitReached.should.equal false
done()
it "should return true if the limit has been exceded (including members and invites)", (done)->
@subscription.membersLimit = 2
@SubscriptionLocator.getSubscription.callsArgWith(1, null, @subscription)
@LimitationsManager.hasGroupMembersLimitReached @user_id, (err, limitReached)->
@LimitationsManager.hasGroupMembersLimitReached @subscriptionId, (err, limitReached)->
limitReached.should.equal true
done()