Merge branch 'main' into flutter/chat-composer
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pipelines_app/features/templates/data/template_repository.dart';
|
||||
|
||||
import 'template_test_support.dart';
|
||||
|
||||
void main() {
|
||||
test(
|
||||
'a malformed created detail never becomes a claimed successful create',
|
||||
() async {
|
||||
for (final id in [null, 0, -1, 'unknown', 1.5]) {
|
||||
final gateway = RecordingGateway([
|
||||
{
|
||||
'type': 'submitted',
|
||||
'detail': {'id': id, 'name': 'Unconfirmed'},
|
||||
},
|
||||
]);
|
||||
await expectLater(
|
||||
TemplateRepository(gateway).submit('Topic', source),
|
||||
throwsA(isA<TemplateRepositoryException>()),
|
||||
);
|
||||
expect(gateway.calls.single.fields['create_only'], isTrue);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user