fixes before build 2
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:receipity/services/backup_format.dart';
|
||||
import 'package:groci/services/backup_format.dart';
|
||||
|
||||
void main() {
|
||||
test('round-trips a backup document', () {
|
||||
@@ -81,9 +81,10 @@ void main() {
|
||||
expect(parsed.shoppingLists.single['name'], 'Weekly');
|
||||
expect(parsed.shoppingListItems.single['name'], 'Milk');
|
||||
expect(parsed.images['products/product_1.jpg'], 'abc123');
|
||||
expect(parsed.encode(), contains('"format": "groci-backup"'));
|
||||
});
|
||||
|
||||
test('accepts a version 1 backup without shopping lists', () {
|
||||
test('accepts legacy receipity backup format', () {
|
||||
const json = '''
|
||||
{
|
||||
"format": "receipity-backup",
|
||||
@@ -104,7 +105,7 @@ void main() {
|
||||
expect(parsed.shopTags, isEmpty);
|
||||
});
|
||||
|
||||
test('rejects a file that is not a Receipity backup', () {
|
||||
test('rejects a file that is not a Groci backup', () {
|
||||
expect(
|
||||
() => BackupDocument.parse('{"hello":"world"}'),
|
||||
throwsFormatException,
|
||||
|
||||
Reference in New Issue
Block a user