API 1.0.39 FAQ sort
This commit is contained in:
@@ -10,7 +10,8 @@ import javax.persistence.*
|
||||
data class Faq (
|
||||
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @get: NonNull var faqId: Long = 0,
|
||||
@Expose @get: NonNull var name: String,
|
||||
@Expose @get: NonNull var description: String,
|
||||
@Expose var description: String? = null,
|
||||
@Expose var sort: Int? = null,
|
||||
|
||||
) {
|
||||
@OneToMany(cascade = [(CascadeType.ALL)], fetch = FetchType.EAGER, mappedBy = "faq")
|
||||
|
||||
@@ -17,6 +17,6 @@ logging.config=classpath:logback-spring.xml
|
||||
logging.file=logs
|
||||
|
||||
# if the database structure has been changed, increment this version number
|
||||
application.version=1.0.37
|
||||
application.version=1.0.38
|
||||
|
||||
jwt.secret=aitrainer
|
||||
@@ -17,7 +17,7 @@ logging.config=classpath:logback-spring.xml
|
||||
logging.file=logs
|
||||
|
||||
# if the database structure has been changed, increment this version number
|
||||
application.version=1.0.37
|
||||
application.version=1.0.38
|
||||
|
||||
jwt.secret=aitrainer
|
||||
jasypt.encryptor.password=Tibor
|
||||
|
||||
@@ -160,8 +160,9 @@ class AppPackageTest {
|
||||
val faqJson: String = record[1]
|
||||
val type = object : TypeToken<List<Faq?>?>() {}.type
|
||||
val faqs: List<Faq> = gson.fromJson(faqJson, type)
|
||||
assertEquals(faqs.size,1)
|
||||
assertEquals(faqs.size,2)
|
||||
assertEquals(faqs[0].name, "What is 1RM?")
|
||||
assertEquals(faqs[0].sort, 1)
|
||||
assertEquals(faqs[0].translations[0].languageCode, "hu")
|
||||
} else if (record[0] == TrainingPlan::class.simpleName) {
|
||||
val trainingPlanJson: String = record[1]
|
||||
|
||||
Reference in New Issue
Block a user