Read works
This commit is contained in:
parent
e24c89f8d9
commit
b5ad764072
1 changed files with 7 additions and 0 deletions
|
@ -20,6 +20,7 @@ main() async {
|
||||||
var output = await service.create(input);
|
var output = await service.create(input);
|
||||||
expect(input, output);
|
expect(input, output);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('create without id', () async {
|
test('create without id', () async {
|
||||||
var input = {'bar': 'baz'};
|
var input = {'bar': 'baz'};
|
||||||
var output = await service.create(input);
|
var output = await service.create(input);
|
||||||
|
@ -27,4 +28,10 @@ main() async {
|
||||||
expect(output.keys, contains('id'));
|
expect(output.keys, contains('id'));
|
||||||
expect(output, containsPair('bar', 'baz'));
|
expect(output, containsPair('bar', 'baz'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('read', () async {
|
||||||
|
var id = 'poobah${new DateTime.now().millisecondsSinceEpoch}';
|
||||||
|
var input = await service.create({'id': id, 'bar': 'baz'});
|
||||||
|
expect(await service.read(id), input);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue