mirror of
https://github.com/dstotijn/go-notion.git
synced 2025-06-15 00:05:04 +02:00
Fix incorrect types for Formula
, Relation
and Rollup
page props
Fixes #11
This commit is contained in:
@ -471,6 +471,41 @@ func TestQueryDatabase(t *testing.T) {
|
||||
"href": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"Age": {
|
||||
"id": "$9nb",
|
||||
"type": "number",
|
||||
"number": 42
|
||||
},
|
||||
"Calculation": {
|
||||
"id": "s(4f",
|
||||
"type": "formula",
|
||||
"formula": {
|
||||
"type": "number",
|
||||
"number": 42
|
||||
}
|
||||
},
|
||||
"Relation": {
|
||||
"id": "Cxl[",
|
||||
"type": "relation",
|
||||
"relation": [
|
||||
{
|
||||
"id": "2be9597f-693f-4b87-baf9-efc545d38ebe"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Rollup": {
|
||||
"id": "xyA}",
|
||||
"type": "rollup",
|
||||
"rollup": {
|
||||
"type": "array",
|
||||
"array": [
|
||||
{
|
||||
"type": "number",
|
||||
"number": 42
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -536,6 +571,41 @@ func TestQueryDatabase(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
"Age": notion.DatabasePageProperty{
|
||||
ID: "$9nb",
|
||||
Type: notion.DBPropTypeNumber,
|
||||
Number: notion.Float64Ptr(42),
|
||||
},
|
||||
"Calculation": notion.DatabasePageProperty{
|
||||
ID: "s(4f",
|
||||
Type: notion.DBPropTypeFormula,
|
||||
Formula: ¬ion.FormulaResult{
|
||||
Type: notion.FormulaResultTypeNumber,
|
||||
Number: notion.Float64Ptr(float64(42)),
|
||||
},
|
||||
},
|
||||
"Relation": notion.DatabasePageProperty{
|
||||
ID: "Cxl[",
|
||||
Type: notion.DBPropTypeRelation,
|
||||
Relation: []notion.Relation{
|
||||
{
|
||||
ID: "2be9597f-693f-4b87-baf9-efc545d38ebe",
|
||||
},
|
||||
},
|
||||
},
|
||||
"Rollup": notion.DatabasePageProperty{
|
||||
ID: "xyA}",
|
||||
Type: notion.DBPropTypeRollup,
|
||||
Rollup: ¬ion.RollupResult{
|
||||
Type: notion.RollupResultTypeArray,
|
||||
Array: []notion.DatabasePageProperty{
|
||||
{
|
||||
Type: notion.DBPropTypeNumber,
|
||||
Number: notion.Float64Ptr(42),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user