Some checks failed
Integration tests for the release process / release-simulation (push) Has been cancelled
**[PT-BR]** - Atualiza o Makefile para alterar mensagens de requisitos de Go, Git LFS e Node.js, substituindo "Forgejo" por "DATAWARE Forge". - Modifica scripts e comandos (ex.: merge de locales, ações, certificados, documentação e CLI) para refletir a nova identidade, mudando nomes e descrições de "Forgejo" para "DATAWARE Forge". - Altera mensagens de log, headers, textos de erro e avisos em vários módulos (actions, hooks, keys, doctor, web, etc.) para garantir consistência com a marca DATAWARE. - Atualiza templates e arquivos de configuração (ex.: app.example.ini, init scripts, etc.) para usar "DATAWARE Forge" em textos, placeholders e URLs. - Ajusta testes e mensagens em módulos de autenticação, webhook, indexador, banco de dados e outros, substituindo referências a "Forgejo" por "DATAWARE Forge". Estas alterações consolidam o rebranding white-label para DATAWARE Forge, mantendo a integridade do código original e preparando o sistema para uso interno e posterior distribuição. **[EN]** - Updated the Makefile to change messages regarding Go, Git LFS, and Node.js requirements, replacing "Forgejo" with "DATAWARE Forge". - Modified scripts and commands (e.g., locale merge, actions, certificate generation, documentation, and CLI) to reflect the new identity by renaming and updating descriptions from "Forgejo" to "DATAWARE Forge". - Changed log messages, headers, error texts, and warnings in various modules (actions, hooks, keys, doctor, web, etc.) to ensure consistency with the DATAWARE brand. - Updated templates and configuration files (e.g., app.example.ini, init scripts, etc.) to use "DATAWARE Forge" in texts, placeholders, and URLs. - Adjusted tests and messages in modules for authentication, webhooks, indexing, database, and others, replacing references from "Forgejo" to "DATAWARE Forge". These changes consolidate the white-label rebranding for DATAWARE Forge, preserving the original code integrity while preparing the system for internal use and future distribution. Marcos A. Lucas <mlucas@dataware.com.br>
36 lines
1.3 KiB
Go
36 lines
1.3 KiB
Go
// Copyright 2024 The Forgejo Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package setting
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"code.gitea.io/gitea/modules/test"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestDisplayNameDefault(t *testing.T) {
|
|
defer test.MockVariableValue(&AppName, "DATAWARE Forge")()
|
|
defer test.MockVariableValue(&AppSlogan, "More than code, a forge of solutions.")()
|
|
defer test.MockVariableValue(&AppDisplayNameFormat, "{APP_NAME}: {APP_SLOGAN}")()
|
|
displayName := generateDisplayName()
|
|
assert.Equal(t, "DATAWARE Forge: More than code, a forge of solutions.", displayName)
|
|
}
|
|
|
|
func TestDisplayNameEmptySlogan(t *testing.T) {
|
|
defer test.MockVariableValue(&AppName, "DATAWARE Forge")()
|
|
defer test.MockVariableValue(&AppSlogan, "")()
|
|
defer test.MockVariableValue(&AppDisplayNameFormat, "{APP_NAME}: {APP_SLOGAN}")()
|
|
displayName := generateDisplayName()
|
|
assert.Equal(t, "DATAWARE Forge", displayName)
|
|
}
|
|
|
|
func TestDisplayNameCustomFormat(t *testing.T) {
|
|
defer test.MockVariableValue(&AppName, "DATAWARE Forge")()
|
|
defer test.MockVariableValue(&AppSlogan, "More than code, a forge of solutions.")()
|
|
defer test.MockVariableValue(&AppDisplayNameFormat, "{APP_NAME} - {APP_SLOGAN}")()
|
|
displayName := generateDisplayName()
|
|
assert.Equal(t, "DATAWARE Forge - More than code, a forge of solutions.", displayName)
|
|
}
|