Skip to content

Commit

Permalink
test entity method
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Brown committed Jul 1, 2012
1 parent d62f09e commit 7dbdd67
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/test/groovy/groovy/datomic/extension/QuerySpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,17 @@ class QuerySpec extends Specification {
'Earth 2',
'Watchmen'] as SortedSet
}

void 'Test entity method'() {
when:
def issueNumber
Peer.open(comicDbUri) {
def results = q('[:find ?issue :where [?issue :issue/name "The Final Curtain"]]') as List
def issueEntity = entity(results[0][0])
issueNumber = issueEntity.get(':issue/number')
}

then:
7 == issueNumber
}
}

0 comments on commit 7dbdd67

Please sign in to comment.