File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -135,3 +135,27 @@ stopifnot({
135
135
anti_join(relation1 , relation2 , by = by ) %> % nrow == 0 &&
136
136
anti_join(relation2 , relation1 , by = by ) %> % nrow == 0
137
137
})
138
+
139
+ bodies <- {
140
+ ns <- entities_xml %> % xml_find_all(' //object[@class="BodyContent"]' )
141
+ tibble(body_id = ns %> % confluence_id ) %> %
142
+ mutate(ns %> % props_tibble ) %> %
143
+ mutate(.keep = " unused" ,
144
+ type = case_when(
145
+ bodyType == 0 ~ " SpaceDescription" ,
146
+ bodyType == 1 ~ " CustomContentEntityObject" ,
147
+ bodyType == 2 ~ " PageEtc" )) %> %
148
+ mutate(ns %> % classful_props_tibble )
149
+ }
150
+
151
+ stopifnot(bodies %> %
152
+ filter(is.na(type )) %> %
153
+ nrow == 0 )
154
+ stopifnot(bodies %> %
155
+ filter(! is.na(content.SpaceDescription )) %> %
156
+ filter(type != " SpaceDescription" ) %> %
157
+ nrow == 0 )
158
+ stopifnot(bodies %> %
159
+ filter(! is.na(content.CustomContentEntityObject )) %> %
160
+ filter(type != " CustomContentEntityObject" ) %> %
161
+ nrow == 0 )
You can’t perform that action at this time.
0 commit comments