marked deprecated function and test

updated testdata to match the data structure
This commit is contained in:
2025-10-03 21:45:44 +02:00
parent 48943dd4b1
commit 4e6c014cee
4 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ func TestExportGSMasterdata(t *testing.T) {
}
func TestImportGSMasterdata(t *testing.T) {
database.SetupTestDB()
database.SetupTestDB(true)
err := Import("../testdata/gsmaster_exported_gsdata.json")
assert.NoError(t, err, "expexted no Error during Export if gsmaster data")
}
+1
View File
@@ -72,6 +72,7 @@ func CalculateSkillImprovementCost(skill string, class string, currentSkillLevel
return CalculateImprovementCost(skill, class, currentSkillLevel)
}
// Deprecated old static function, now using DB data
func CalculateImprovementCost(skill string, class string, currentSkillLevel int) (*models.LearnCost, error) {
/*
if !Config.AllowedGroups[class][skill.Group] {
+4 -2
View File
@@ -56,9 +56,11 @@ func setupTestDB(opts ...bool) {
}
}
// tests Deprecates old static function, now using DB data
func TestCalculateImprovementCost(t *testing.T) {
//loadLevelingConfigOld()
setupTestDB(false)
// Setup test database
database.SetupTestDB(true, true)
defer database.ResetTestDB()
/*
// Save original Config
originalConfig := Config
+2 -2
View File
@@ -242,8 +242,8 @@
"quelle": "ARK5 63",
"bonus": 0,
"Stufe": 0,
"AP": 0,
"Reichweite": 0,
"AP": "0",
"Reichweite": "15 m",
"Wirkungsziel": ""
}
],