package constants

import "testing"

func TestPlatformReferenceTargetForField(t *testing.T) {
	tests := []struct {
		name string
		want string
		ok   bool
	}{
		{name: "RecordTypeId", want: ObjectRecordType, ok: true},
		{name: "record_type_id", want: ObjectRecordType, ok: true},
		{name: "OwnerId", want: TableUser, ok: true},
		{name: "CreatedById", want: TableUser, ok: true},
		{name: "LastModifiedById", want: TableUser, ok: true},
		{name: "AccountId", ok: false},
	}

	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			got, ok := PlatformReferenceTargetForField(tt.name)
			if ok != tt.ok || got != tt.want {
				t.Fatalf("PlatformReferenceTargetForField(%q) = (%q, %v), want (%q, %v)", tt.name, got, ok, tt.want, tt.ok)
			}
		})
	}
}
