@@ -29,7 +29,8 @@ var API_ENDPOINT = process.env.API_ENDPOINT || 'http://localhost:8080',
2929 USER = {
3030 heffan : "ad|132456" ,
3131 "super" : "ad|132457" ,
32- user : "ad|132458"
32+ user : "ad|132458" ,
33+ ksmith : "ad|124861"
3334 } ;
3435
3536
@@ -389,14 +390,19 @@ describe('SRM Round Questions APIs', function () {
389390 assertPostError ( "/v2/data/srm/questions/306/answers" , null , validRequest , 401 , "Authorized information needed." , done ) ;
390391 } ) ;
391392
392- it ( "Admin access only." , function ( done ) {
393- assertPostError ( "/v2/data/srm/questions/306/answers" , 'user' , validRequest , 403 , "Admin access only." , done ) ;
393+ it ( "Admin or web Arena super user only." , function ( done ) {
394+ assertPostError ( "/v2/data/srm/questions/306/answers" , 'user' , validRequest , 403 , "Admin or web Arena super user only." , done ) ;
394395 } ) ;
395396
397+ // Only admin or web arena super user can get into this step
396398 it ( "questionId should be number." , function ( done ) {
397399 assertPostError ( "/v2/data/srm/questions/aaa/answers" , 'heffan' , validRequest , 400 , "questionId should be number." , done ) ;
398400 } ) ;
399401
402+ it ( "questionId should be number." , function ( done ) {
403+ assertPostError ( "/v2/data/srm/questions/aaa/answers" , 'ksmith' , validRequest , 400 , "questionId should be number." , done ) ;
404+ } ) ;
405+
400406 it ( "questionId should be Integer." , function ( done ) {
401407 assertPostError ( "/v2/data/srm/questions/30.6/answers" , 'heffan' , validRequest , 400 , "questionId should be Integer." , done ) ;
402408 } ) ;
@@ -935,4 +941,4 @@ describe('SRM Round Questions APIs', function () {
935941 ] , done ) ;
936942 } ) ;
937943 } ) ;
938- } ) ;
944+ } ) ;
0 commit comments