API1.0.22+2 dataAllowedPolicy
This commit is contained in:
parent
6f9850ecab
commit
eab46438c8
@ -91,7 +91,7 @@ class CustomerController ( private val customerRepository: CustomerRepository) {
|
||||
|
||||
val password: String? = newCustomer.password
|
||||
val updatedCustomer: Customer
|
||||
if ( password == null || password.isEmpty() ) {
|
||||
if ( password == null || password.length == 0 ) {
|
||||
updatedCustomer =
|
||||
returnCustomer.copy(
|
||||
name = newCustomer.name,
|
||||
@ -100,8 +100,8 @@ class CustomerController ( private val customerRepository: CustomerRepository) {
|
||||
birthYear = newCustomer.birthYear,
|
||||
fitnessLevel = newCustomer.fitnessLevel,
|
||||
bodyType = newCustomer.bodyType,
|
||||
goal = newCustomer.goal
|
||||
//weight = newCustomer.weight
|
||||
goal = newCustomer.goal,
|
||||
dataPolicyAllowed = newCustomer.dataPolicyAllowed
|
||||
)
|
||||
} else {
|
||||
updatedCustomer =
|
||||
@ -113,8 +113,8 @@ class CustomerController ( private val customerRepository: CustomerRepository) {
|
||||
birthYear = newCustomer.birthYear,
|
||||
fitnessLevel = newCustomer.fitnessLevel,
|
||||
bodyType = newCustomer.bodyType,
|
||||
goal = newCustomer.goal
|
||||
//weight = newCustomer.weight
|
||||
goal = newCustomer.goal,
|
||||
dataPolicyAllowed = newCustomer.dataPolicyAllowed
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -80,9 +80,11 @@ class CustomerTests {
|
||||
|
||||
assertNotNull(updatedCustomer)
|
||||
updatedCustomer.firstname ="Tiborka"
|
||||
updatedCustomer.dataPolicyAllowed = 1;
|
||||
|
||||
val customer: Customer = customerRepository.save( updatedCustomer )
|
||||
assertEquals( customer.firstname, "Tiborka")
|
||||
assertEquals(customer.dataPolicyAllowed, 1)
|
||||
|
||||
customerRepository.delete(updatedCustomer)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user