func TestParseObjectId(t *testing.T) { for _, test := range parseObjectIdTests { actual := strings.ParseObjectId(test.input) if actual != test.expected { t.Errorf("expecting ParseObjectId(%v) to be %v, got %v", test.input, test.expected, actual) } } }
func (f Form) ParseObjectId(field string) bson.ObjectId { id := f.GetOne(field) return strings.ParseObjectId(id) }