diff options
Diffstat (limited to 'app/domain/__tests__/repository_spec.js')
| -rw-r--r-- | app/domain/__tests__/repository_spec.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/app/domain/__tests__/repository_spec.js b/app/domain/__tests__/repository_spec.js new file mode 100644 index 0000000..a254267 --- /dev/null +++ b/app/domain/__tests__/repository_spec.js @@ -0,0 +1,23 @@ +import Repository from '../repository'; + +describe("Repository", () => { + let subject = null; + const type = 'Account' + + beforeEach(() => { + subject = new Repository(); + }); + + afterEach(() => { + subject.deleteAll(type); + }); + + it ("can save an account", () => { + subject.save(type, { + authentication_token: 'secret' + }) + + expect(subject.count(type)).toEqual(1); + expect(subject.all(type)[0]['authentication_token']).toEqual('secret'); + }); +}); |
