Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1daf303
commit 4f3ecf1
Showing
1 changed file
with
9 additions
and
9 deletions.
There are no files selected for viewing
18 changes: 9 additions & 9 deletions
18
domain/archivist/services/specs/updateRecordForIdData.spec.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
update = require '../update' | ||
MemoryArchive = require './mocks/MemoryArchive' | ||
createData = require './mocks/createData' | ||
|
||
require 'should' | ||
|
||
describe 'Update record for some data', -> | ||
describe '#update', -> | ||
it 'should return an updated record', (done) -> | ||
data = createData | ||
archie = new MemoryArchive() | ||
created = archie.create(data, ( ->)) | ||
result = update(1, created, {name:"Joseph"}) | ||
result.name.should.eql "Joseph" | ||
archie.recordCount.should.eql 1 | ||
describe '#update', -> | ||
it 'should return an updated record', -> | ||
data = createData() | ||
archie = new MemoryArchive() | ||
created = archie.create(data, ( ->)) | ||
result = update(1, archie, {name:"Joseph"}) | ||
result.name.should.eql "Joseph" | ||
newSize = archie.getSize() | ||
newSize.should.eql 1 |