|
@@ -54,11 +54,11 @@ describe "SubscriptionGroupController", ->
|
|
|
describe "addUserToGroup", ->
|
|
describe "addUserToGroup", ->
|
|
|
|
|
|
|
|
it "should use the admin id for the logged in user and take the email address from the body", (done)->
|
|
it "should use the admin id for the logged in user and take the email address from the body", (done)->
|
|
|
- newEmail = "31231"
|
|
|
|
|
|
|
+ newEmail = " boB@gmaiL.com "
|
|
|
@req.body = email: newEmail
|
|
@req.body = email: newEmail
|
|
|
res =
|
|
res =
|
|
|
json : (data)=>
|
|
json : (data)=>
|
|
|
- @GroupHandler.addUserToGroup.calledWith(@adminUserId, newEmail).should.equal true
|
|
|
|
|
|
|
+ @GroupHandler.addUserToGroup.calledWith(@adminUserId, "bob@gmail.com").should.equal true
|
|
|
data.user.should.deep.equal @user
|
|
data.user.should.deep.equal @user
|
|
|
done()
|
|
done()
|
|
|
@Controller.addUserToGroup @req, res
|
|
@Controller.addUserToGroup @req, res
|