diff --git a/test/core/interaction_output_test.dart b/test/core/interaction_output_test.dart index ee3780ed..d6667a6d 100644 --- a/test/core/interaction_output_test.dart +++ b/test/core/interaction_output_test.dart @@ -64,5 +64,27 @@ void main() { final value2 = await interactionOutput.value(); expect(value1, value2); }); + + test( + "throw a NotReadableException when calling the arrayBuffer() method " + "twice", () async { + final contentSerdes = ContentSerdes(); + final content = Content( + "text/plain", + const Stream.empty(), + ); + + final interactionOutput = InteractionOutput( + content, + contentSerdes, + Form(Uri.parse("http://example.org")), + const DataSchema(), + ); + + await interactionOutput.arrayBuffer(); + + final result = interactionOutput.arrayBuffer(); + await expectLater(result, throwsA(isA())); + }); }); }