Skip to content

Commit

Permalink
fixup! feat!: implement proper serialization logic
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Jun 4, 2024
1 parent 47b2e6c commit 1124666
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions test/core/definitions/serialization_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void main() {
"schema": "foobar",
};

final link = AdditionalExpectedResponse.fromJson(
final additionalExpectedResponse = AdditionalExpectedResponse.fromJson(
additionalExpectedResponseJson,
// TODO: Document this parameter
"application/json",
Expand All @@ -136,7 +136,33 @@ void main() {

expect(
additionalExpectedResponseJson,
link.toJson(),
additionalExpectedResponse.toJson(),
);
});

test("Actions", () async {
final actionJson = {
"input": {},
"output": {},
"idempotent": true,
"safe": true,
"synchronous": true,
"forms": [
{
"href": "https://example.org",
"contentType": "application/json",
}
],
};

final action = Action.fromJson(
actionJson,
PrefixMapping(),
);

expect(
actionJson,
action.toJson(),
);
});
});
Expand Down

0 comments on commit 1124666

Please sign in to comment.