Skip to content

Commit

Permalink
test: observedBy in ObservationConstraint
Browse files Browse the repository at this point in the history
  • Loading branch information
Rdataflow committed Sep 5, 2024
1 parent d4cd799 commit fe0df2e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cli/test/lib/commands/publish.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,10 @@ describe('@cube-creator/cli/lib/commands/publish', function () {
minCount: 1,
},
})

const observedByIns = [props.has(sh.path, cube.observedBy).out(sh.in).list()!].map(ptr => ptr.term)
expect(observedByIns).to.deep.contain.members([$rdf.namedNode('https://ld.admin.ch/office/VII.1.7')])
expect(observedByIns).to.have.length(1)
})

it('removes all csvw triples', async () => {
Expand Down
3 changes: 3 additions & 0 deletions cli/test/lib/commands/transform.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,12 @@ describe('@cube-creator/cli/lib/commands/transform', function () {
path: rdf.type,
hasValue: cube.Observation,
minCount: 1,
maxCount: 1,
}, {
path: cube.observedBy,
hasValue: $rdf.namedNode('https://ld.admin.ch/office/VII.1.7'),
minCount: 1,
maxCount: 1,
}, {
path: $rdf.namedNode('https://environment.ld.admin.ch/foen/ubd/28/dimension/year'),
hasValue: $rdf.literal('2000', xsd.gYear),
Expand Down

0 comments on commit fe0df2e

Please sign in to comment.