@@ -151,36 +151,36 @@ describe('KuzzleUser methods', function () {
151151 describe ( '#setProfiles' , function ( ) {
152152 beforeEach ( function ( ) {
153153 kuzzle = new Kuzzle ( 'http://localhost:7512' ) ;
154- kuzzleUser = new KuzzleUser ( kuzzle . security , 'myUser' , { profilesIds : [ 'profile1' ] } ) ;
154+ kuzzleUser = new KuzzleUser ( kuzzle . security , 'myUser' , { profileIds : [ 'profile1' ] } ) ;
155155 } ) ;
156156
157- it ( 'should throw an error if the profilesIds parameter is null' , function ( done ) {
157+ it ( 'should throw an error if the profileIds parameter is null' , function ( done ) {
158158 should ( ( function ( ) {
159159 kuzzleUser . setProfiles ( null ) ;
160160 } ) ) . throw ( Error ) ;
161161
162162 done ( ) ;
163163 } ) ;
164164
165- it ( 'should throw an error if the profilesIds parameter is not an array' , function ( done ) {
165+ it ( 'should throw an error if the profileIds parameter is not an array' , function ( done ) {
166166 should ( ( function ( ) {
167167 kuzzleUser . setProfiles ( 1 ) ;
168168 } ) ) . throw ( Error ) ;
169169
170170 done ( ) ;
171171 } ) ;
172172
173- it ( 'should throw an error if the profilesIds parameter is not an array of strings' , function ( done ) {
173+ it ( 'should throw an error if the profileIds parameter is not an array of strings' , function ( done ) {
174174 should ( ( function ( ) {
175175 kuzzleUser . setProfiles ( [ 1 ] ) ;
176176 } ) ) . throw ( Error ) ;
177177
178178 done ( ) ;
179179 } ) ;
180180
181- it ( 'should add the rights profiles IDs in profilesIds ' , function ( done ) {
181+ it ( 'should add the rights profiles IDs in profileIds ' , function ( done ) {
182182 kuzzleUser . setProfiles ( [ 'profile2' ] ) ;
183- should ( kuzzleUser . content . profilesIds [ 0 ] ) . be . exactly ( 'profile2' ) ;
183+ should ( kuzzleUser . content . profileIds [ 0 ] ) . be . exactly ( 'profile2' ) ;
184184 done ( ) ;
185185 } ) ;
186186 } ) ;
@@ -189,7 +189,7 @@ describe('KuzzleUser methods', function () {
189189 describe ( '#addProfile' , function ( ) {
190190 beforeEach ( function ( ) {
191191 kuzzle = new Kuzzle ( 'http://localhost:7512' ) ;
192- kuzzleUser = new KuzzleUser ( kuzzle . security , 'myUser' , { profilesIds : [ 'profile1' ] } ) ;
192+ kuzzleUser = new KuzzleUser ( kuzzle . security , 'myUser' , { profileIds : [ 'profile1' ] } ) ;
193193 } ) ;
194194
195195 it ( 'should throw an error if the profileId parameter is null' , function ( done ) {
@@ -211,22 +211,22 @@ describe('KuzzleUser methods', function () {
211211 it ( 'should add the profile if it does not already exists in list' , function ( done ) {
212212 kuzzleUser . addProfile ( 'profile2' ) ;
213213
214- should ( kuzzleUser . content . profilesIds ) . be . eql ( [ 'profile1' , 'profile2' ] ) ;
214+ should ( kuzzleUser . content . profileIds ) . be . eql ( [ 'profile1' , 'profile2' ] ) ;
215215 done ( ) ;
216216 } ) ;
217217
218218 it ( 'should not add the profile if it already exists in list' , function ( done ) {
219219 kuzzleUser . addProfile ( 'profile1' ) ;
220220
221- should ( kuzzleUser . content . profilesIds ) . be . eql ( [ 'profile1' ] ) ;
221+ should ( kuzzleUser . content . profileIds ) . be . eql ( [ 'profile1' ] ) ;
222222 done ( ) ;
223223 } ) ;
224224
225- it ( 'should add the profile even if no profilesIds are currently set' , function ( done ) {
226- delete kuzzleUser . content . profilesIds ;
225+ it ( 'should add the profile even if no profileIds are currently set' , function ( done ) {
226+ delete kuzzleUser . content . profileIds ;
227227 kuzzleUser . addProfile ( 'profile1' ) ;
228228
229- should ( kuzzleUser . content . profilesIds ) . be . eql ( [ 'profile1' ] ) ;
229+ should ( kuzzleUser . content . profileIds ) . be . eql ( [ 'profile1' ] ) ;
230230 done ( ) ;
231231 } ) ;
232232
@@ -235,14 +235,14 @@ describe('KuzzleUser methods', function () {
235235 describe ( '#serialize' , function ( ) {
236236 beforeEach ( function ( ) {
237237 kuzzle = new Kuzzle ( 'http://localhost:7512' ) ;
238- kuzzleUser = new KuzzleUser ( kuzzle . security , 'user' , { some : 'content' , profilesIds : [ 'profile' ] } ) ;
238+ kuzzleUser = new KuzzleUser ( kuzzle . security , 'user' , { some : 'content' , profileIds : [ 'profile' ] } ) ;
239239 } ) ;
240240
241241 it ( 'should serialize with correct attributes' , function ( done ) {
242242 var serialized = kuzzleUser . serialize ( ) ;
243243
244244 should ( serialized . _id ) . be . exactly ( 'user' ) ;
245- should ( serialized . body ) . be . match ( { some : 'content' , profilesIds : [ 'profile' ] } ) ;
245+ should ( serialized . body ) . be . match ( { some : 'content' , profileIds : [ 'profile' ] } ) ;
246246 done ( ) ;
247247 } ) ;
248248 } ) ;
@@ -254,7 +254,7 @@ describe('KuzzleUser methods', function () {
254254 error = false ;
255255
256256 result = { result : { _id : 'user' } } ;
257- kuzzleUser = new KuzzleUser ( kuzzle . security , 'user' , { some : 'content' , profilesIds : [ 'profile' ] } ) ;
257+ kuzzleUser = new KuzzleUser ( kuzzle . security , 'user' , { some : 'content' , profileIds : [ 'profile' ] } ) ;
258258 expectedQuery = {
259259 action : 'deleteUser' ,
260260 controller : 'security'
@@ -288,10 +288,10 @@ describe('KuzzleUser methods', function () {
288288
289289 describe ( '#getProfiles' , function ( ) {
290290 it ( 'should return the associated profiles' , function ( ) {
291- var profilesIds = [ 'profile' ] ;
291+ var profileIds = [ 'profile' ] ;
292292 kuzzle = new Kuzzle ( 'http://localhost:7512' ) ;
293- kuzzleUser = new KuzzleUser ( kuzzle . security , 'user' , { some : 'content' , profilesIds } ) ;
294- should ( kuzzleUser . getProfiles ( ) ) . be . eql ( profilesIds ) ;
293+ kuzzleUser = new KuzzleUser ( kuzzle . security , 'user' , { some : 'content' , profileIds } ) ;
294+ should ( kuzzleUser . getProfiles ( ) ) . be . eql ( profileIds ) ;
295295 } ) ;
296296 } ) ;
297297} ) ;
0 commit comments