tests: add some basic unit tests
This commit is contained in:
parent
b0f3120921
commit
a5e01f9f92
3 changed files with 286 additions and 0 deletions
|
|
@ -26,3 +26,31 @@ func TestNewClientFromConfig_MissingHost(t *testing.T) {
|
|||
t.Error("Expected error for nonexistent host")
|
||||
}
|
||||
}
|
||||
|
||||
func TestNewClient_EmptyHostname(t *testing.T) {
|
||||
t.Skip("Skipping: NewClient makes actual network calls")
|
||||
// Empty hostname should default to codeberg.org
|
||||
// This test would require mocking the gitea client
|
||||
}
|
||||
|
||||
func TestNewClient_WithHostname(t *testing.T) {
|
||||
t.Skip("Skipping: NewClient makes actual network calls")
|
||||
// This test would require mocking the gitea client
|
||||
}
|
||||
|
||||
func TestNewClient_EmptyToken(t *testing.T) {
|
||||
t.Skip("Skipping: NewClient makes actual network calls")
|
||||
// Empty token should work (for public repos)
|
||||
// This test would require mocking the gitea client
|
||||
}
|
||||
|
||||
func TestNewClientFromConfig_ValidHost(t *testing.T) {
|
||||
t.Skip("Skipping: NewClient makes actual network calls")
|
||||
// This test would require mocking the gitea client
|
||||
}
|
||||
|
||||
func TestNewClientFromConfig_EmptyHostname(t *testing.T) {
|
||||
t.Skip("Skipping: NewClient makes actual network calls")
|
||||
// Empty hostname should trigger GetHost logic (falls back to codeberg.org)
|
||||
// This test would require mocking the gitea client
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue