From 4dcdf8616a02f1df241730a1e18efa5933f57916 Mon Sep 17 00:00:00 2001 From: Mabel Li Date: Mon, 29 Apr 2024 16:48:56 +0100 Subject: [PATCH] Remove more tests that assert town as required --- internal/shared/lpa_test.go | 4 ++-- lambda/create/validate_test.go | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/internal/shared/lpa_test.go b/internal/shared/lpa_test.go index 3ce0a9d3..e333e1f0 100644 --- a/internal/shared/lpa_test.go +++ b/internal/shared/lpa_test.go @@ -10,9 +10,9 @@ import ( func TestLpaInitMarshalJSON(t *testing.T) { expected := `{ "lpaType":"", -"donor":{"uid":"","firstNames":"","lastName":"","address":{"line1":"","town":"","country":""},"dateOfBirth":"","email":"","contactLanguagePreference":""}, +"donor":{"uid":"","firstNames":"","lastName":"","address":{"line1":"","country":""},"dateOfBirth":"","email":"","contactLanguagePreference":""}, "attorneys":null, -"certificateProvider":{"uid":"","firstNames":"","lastName":"","address":{"line1":"","town":"","country":""},"email":"","phone":"","channel":""}, +"certificateProvider":{"uid":"","firstNames":"","lastName":"","address":{"line1":"","country":""},"email":"","phone":"","channel":""}, "signedAt":"0001-01-01T00:00:00Z" }` diff --git a/lambda/create/validate_test.go b/lambda/create/validate_test.go index 30e3e12f..91fc8ca9 100644 --- a/lambda/create/validate_test.go +++ b/lambda/create/validate_test.go @@ -10,7 +10,6 @@ import ( var validAddress = shared.Address{ Line1: "123 Main St", - Town: "Homeland", Country: "GB", } @@ -46,7 +45,6 @@ func TestValidateAttorneyEmpty(t *testing.T) { assert.Contains(t, errors, shared.FieldError{Source: "/test/status", Detail: "field is required"}) assert.Contains(t, errors, shared.FieldError{Source: "/test/dateOfBirth", Detail: "field is required"}) assert.Contains(t, errors, shared.FieldError{Source: "/test/address/line1", Detail: "field is required"}) - assert.Contains(t, errors, shared.FieldError{Source: "/test/address/town", Detail: "field is required"}) assert.Contains(t, errors, shared.FieldError{Source: "/test/address/country", Detail: "field is required"}) } @@ -105,7 +103,6 @@ func TestValidateTrustCorporationEmpty(t *testing.T) { assert.Contains(t, errors, shared.FieldError{Source: "/test/email", Detail: "field is required"}) assert.Contains(t, errors, shared.FieldError{Source: "/test/status", Detail: "field is required"}) assert.Contains(t, errors, shared.FieldError{Source: "/test/address/line1", Detail: "field is required"}) - assert.Contains(t, errors, shared.FieldError{Source: "/test/address/town", Detail: "field is required"}) assert.Contains(t, errors, shared.FieldError{Source: "/test/address/country", Detail: "field is required"}) }