eventric
Version:
behavior-first application development
22 lines (15 loc) • 660 B
text/coffeescript
describe 'Query Projection Feature', ->
describe 'given we created and initialized some example context including a queryhandler', ->
exampleContext = null
beforeEach (done) ->
exampleContext = eventric.context 'exampleContext'
exampleContext.addQueryHandler 'getExample', (params) ->
@$projectionStore 'inmemory', 'ExampleProjection'
exampleContext.initialize()
.then ->
done()
describe 'when we query the context', ->
it 'then the query should return the correct result', ->
exampleContext.query 'getExample', id: 1
.then (result) ->
expect(result).to.deep.equal {}