@@ -687,7 +687,7 @@ class AdminControllerSpec extends PlayPostgresSpec with AdminUtils {
687
687
}
688
688
689
689
" don't fail if we send a null in an optional parameter" in withApiClient { client =>
690
- val json = """ {"name":"wiringbits","email ":null,"password":"wiringbits"}"""
690
+ val json = """ {"name":"wiringbits","last_name ":null,"email":"[email protected] " ,"password":"wiringbits"}"""
691
691
val path = s " /admin/tables/ ${usersSettings.tableName}"
692
692
val response = POST (path, json).futureValue
693
693
response.header.status mustBe 200
@@ -696,6 +696,7 @@ class AdminControllerSpec extends PlayPostgresSpec with AdminUtils {
696
696
client.getTableMetadata(usersSettings.tableName, List (" name" , " ASC" ), List (0 , 9 ), " {}" ).futureValue
697
697
698
698
responseMetadata.head.nonEmpty mustBe true
699
+ responseMetadata.head(" last_name" ) mustBe " "
699
700
}
700
701
701
702
" return new user id" in withApiClient { implicit client =>
@@ -847,23 +848,25 @@ class AdminControllerSpec extends PlayPostgresSpec with AdminUtils {
847
848
848
849
" don't fail if we send a null in an optional parameter" in withApiClient { client =>
849
850
val name = " wiringbits"
851
+ val lastName = " test"
850
852
851
853
val password = " wiringbits"
852
- val request = AdminCreateTable .Request (Map (" name" -> name, " email" -> email, " password" -> password))
854
+ val request =
855
+ AdminCreateTable .Request (Map (" name" -> name, " last_name" -> lastName, " email" -> email, " password" -> password))
853
856
client.createItem(" users" , request).futureValue
854
857
val responseMetadata1 =
855
858
client.getTableMetadata(usersSettings.tableName, List (" name" , " ASC" ), List (0 , 9 ), " {}" ).futureValue
856
859
val id = responseMetadata1.head(" id" )
857
860
858
- val json = """ {"email": null}"""
861
+ val json = """ {"last_name":" null" }"""
859
862
val path = s " /admin/tables/ ${usersSettings.tableName}/ $id"
860
863
val response = PUT (path, json).futureValue
861
864
response.header.status mustBe 200
862
865
863
866
val responseMetadata2 =
864
867
client.getTableMetadata(usersSettings.tableName, List (" name" , " ASC" ), List (0 , 9 ), " {}" ).futureValue
865
868
866
- responseMetadata2.head(" email " ) mustBe " "
869
+ responseMetadata2.head(" last_name " ) mustBe " "
867
870
}
868
871
869
872
" fail if the field in body doesn't exists" in withApiClient { client =>
0 commit comments