Add configuration files and update project documentation
- Introduced .editorconfig for consistent coding styles across the project. - Added .golangci.yml for Go linting configuration. - Updated AGENTS.md to clarify project structure and components. - Enhanced CONTRIBUTING.md with Makefile usage for common tasks. - Updated Dockerfiles to use Go 1.24 and improved build instructions. - Refined README.md and deployment documentation for clarity. - Added testing documentation in testing.md for backend and frontend tests. - Introduced Makefile for streamlined development commands and tasks.
This commit is contained in:
32
internal/app/services/client_test.go
Normal file
32
internal/app/services/client_test.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package services_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/andyleap/hnh-map/internal/app/services"
|
||||
)
|
||||
|
||||
func TestFixMultipartContentType_NeedsQuoting(t *testing.T) {
|
||||
ct := "multipart/form-data; boundary=----WebKitFormBoundary=abc123"
|
||||
got := services.FixMultipartContentType(ct)
|
||||
want := `multipart/form-data; boundary="----WebKitFormBoundary=abc123"`
|
||||
if got != want {
|
||||
t.Fatalf("expected %q, got %q", want, got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestFixMultipartContentType_AlreadyQuoted(t *testing.T) {
|
||||
ct := `multipart/form-data; boundary="----WebKitFormBoundary"`
|
||||
got := services.FixMultipartContentType(ct)
|
||||
if got != ct {
|
||||
t.Fatalf("expected unchanged, got %q", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestFixMultipartContentType_Normal(t *testing.T) {
|
||||
ct := "multipart/form-data; boundary=----WebKitFormBoundary"
|
||||
got := services.FixMultipartContentType(ct)
|
||||
if got != ct {
|
||||
t.Fatalf("expected unchanged, got %q", got)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user