Skip to content

Commit

Permalink
fixup! test: improve ContentSerdes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Dec 31, 2023
1 parent 5e72a94 commit 4795bdb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/core/content_serdes_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,18 @@ void main() {
throwsA(isA<ContentSerdesException>()),
);
});

test('convert DataSchemaValues to Content', () async {
final contentSerdes = ContentSerdes();
const inputValue = 'foo';

final content = contentSerdes.valueToContent(
DataSchemaValue.fromString(inputValue),
null,
);

expect(await content.toByteList(), [34, 102, 111, 111, 34]);
expect(content.type, 'application/json');
});
});
}

0 comments on commit 4795bdb

Please sign in to comment.