Skip to content

Commit f0fca6f

Browse files
patrick.rissmann@l3montree.compatrick.rissmann@l3montree.com
authored andcommitted
Added test for the controller constructor and the list method
1 parent b7e8057 commit f0fca6f

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

internal/core/attestation/attestation_controller.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ type attestationController struct {
1010
attestationRepository core.AttestationRepository
1111
}
1212

13+
func NewAttestationController(repository core.AttestationRepository) *attestationController {
14+
return &attestationController{
15+
attestationRepository: repository,
16+
}
17+
}
18+
1319
func (a *attestationController) List(ctx core.Context) error {
1420

1521
asset := core.GetAsset(ctx)
@@ -22,12 +28,6 @@ func (a *attestationController) List(ctx core.Context) error {
2228
return ctx.JSON(200, attestationList)
2329
}
2430

25-
func NewAttestationController(repository core.AttestationRepository) *attestationController {
26-
return &attestationController{
27-
attestationRepository: repository,
28-
}
29-
}
30-
3131
func (a *attestationController) Create(ctx core.Context) error {
3232
var attestation models.Attestation
3333
err := ctx.Bind(&attestation)

0 commit comments

Comments
 (0)