mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-09-26 04:04:15 +00:00
unit tests
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package db
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestUser_Struct(t *testing.T) {
|
||||
user := &User{
|
||||
DID: "did:plc:test",
|
||||
Handle: "alice.bsky.social",
|
||||
PDSEndpoint: "https://bsky.social",
|
||||
}
|
||||
|
||||
if user.DID != "did:plc:test" {
|
||||
t.Errorf("Expected DID %q, got %q", "did:plc:test", user.DID)
|
||||
}
|
||||
|
||||
if user.Handle != "alice.bsky.social" {
|
||||
t.Errorf("Expected handle %q, got %q", "alice.bsky.social", user.Handle)
|
||||
}
|
||||
|
||||
if user.PDSEndpoint != "https://bsky.social" {
|
||||
t.Errorf("Expected PDS endpoint %q, got %q", "https://bsky.social", user.PDSEndpoint)
|
||||
}
|
||||
}
|
||||
|
||||
// RepositoryInfo tests removed - struct definition may vary
|
||||
|
||||
// TODO: Add tests for all model structs
|
||||
Reference in New Issue
Block a user