implement achievements and appearances tests
This commit is contained in:
parent
8a568d31bd
commit
28f296e546
2408
internal/achievements/achievements_test.go
Normal file
2408
internal/achievements/achievements_test.go
Normal file
File diff suppressed because it is too large
Load Diff
1550
internal/appearances/appearances_test.go
Normal file
1550
internal/appearances/appearances_test.go
Normal file
File diff suppressed because it is too large
Load Diff
@ -302,7 +302,7 @@ func (m *Manager) handleStatsCommand(args []string) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// handleValidateCommand validates all appearances
|
// handleValidateCommand validates all appearances
|
||||||
func (m *Manager) handleValidateCommand(args []string) (string, error) {
|
func (m *Manager) handleValidateCommand(_ []string) (string, error) {
|
||||||
issues := m.ValidateAllAppearances()
|
issues := m.ValidateAllAppearances()
|
||||||
|
|
||||||
if len(issues) == 0 {
|
if len(issues) == 0 {
|
||||||
@ -363,7 +363,7 @@ func (m *Manager) handleInfoCommand(args []string) (string, error) {
|
|||||||
return fmt.Sprintf("Appearance %d not found.", appearanceID), nil
|
return fmt.Sprintf("Appearance %d not found.", appearanceID), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
result := fmt.Sprintf("Appearance Information:\n")
|
result := "Appearance Information:\n"
|
||||||
result += fmt.Sprintf("ID: %d\n", appearance.GetID())
|
result += fmt.Sprintf("ID: %d\n", appearance.GetID())
|
||||||
result += fmt.Sprintf("Name: %s\n", appearance.GetName())
|
result += fmt.Sprintf("Name: %s\n", appearance.GetName())
|
||||||
result += fmt.Sprintf("Min Client Version: %d\n", appearance.GetMinClientVersion())
|
result += fmt.Sprintf("Min Client Version: %d\n", appearance.GetMinClientVersion())
|
||||||
@ -372,7 +372,7 @@ func (m *Manager) handleInfoCommand(args []string) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// handleReloadCommand reloads appearances from database
|
// handleReloadCommand reloads appearances from database
|
||||||
func (m *Manager) handleReloadCommand(args []string) (string, error) {
|
func (m *Manager) handleReloadCommand(_ []string) (string, error) {
|
||||||
if err := m.ReloadFromDatabase(); err != nil {
|
if err := m.ReloadFromDatabase(); err != nil {
|
||||||
return "", fmt.Errorf("failed to reload appearances: %w", err)
|
return "", fmt.Errorf("failed to reload appearances: %w", err)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user