(t *testing.T)
| 770 | } |
| 771 | |
| 772 | func TestRecordLoad(t *testing.T) { |
| 773 | t.Parallel() |
| 774 | |
| 775 | collection := core.NewBaseCollection("test") |
| 776 | collection.Fields.Add(&core.TextField{Name: "text"}) |
| 777 | |
| 778 | record := core.NewRecord(collection) |
| 779 | record.Load(map[string]any{ |
| 780 | "text": 123, |
| 781 | "custom": 456, |
| 782 | }) |
| 783 | |
| 784 | expected := map[string]any{ |
| 785 | "text": "123", |
| 786 | "custom": 456, |
| 787 | } |
| 788 | |
| 789 | for k, v := range expected { |
| 790 | get := record.Get(k) |
| 791 | if get != v { |
| 792 | t.Errorf("Expected %q to be %#v, got %#v", k, v, get) |
| 793 | } |
| 794 | } |
| 795 | } |
| 796 | |
| 797 | func TestRecordGetBool(t *testing.T) { |
| 798 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…