Approval-based snapshot testing library for Go (mirror)
at main 56 lines 1.1 kB view raw
1--- 2title: Multiple Complex Structures 3test_name: TestMultipleComplexStructures 4file_name: shutter_test.go 5version: 0.1.0 6--- 7[]shutter_test.User{ 8 { 9 ID: 1, 10 Username: "alice", 11 Email: "alice@example.com", 12 Active: true, 13 CreatedAt: time.Time{ 14 wall: 0x0, 15 ext: 0, 16 loc: (*time.Location)(nil), 17 }, 18 Roles: []string{"user", "moderator"}, 19 Metadata: map[string]interface{}{ 20 "badge": "verified", 21 "verified": true, 22 }, 23 }, 24 { 25 ID: 2, 26 Username: "bob", 27 Email: "bob@example.com", 28 Active: false, 29 CreatedAt: time.Time{ 30 wall: 0x0, 31 ext: 0, 32 loc: (*time.Location)(nil), 33 }, 34 Roles: []string{"user"}, 35 Metadata: map[string]interface{}{ 36 "avatar": "https://example.com/bob.jpg", 37 "verified": false, 38 }, 39 }, 40 { 41 ID: 3, 42 Username: "charlie", 43 Email: "charlie@example.com", 44 Active: true, 45 CreatedAt: time.Time{ 46 wall: 0x0, 47 ext: 0, 48 loc: (*time.Location)(nil), 49 }, 50 Roles: []string{"user", "admin"}, 51 Metadata: map[string]interface{}{ 52 "account_age_days": 365, 53 "verified": true, 54 }, 55 }, 56}