Files
AutoGPT/classic/frontend/test/task_request_body_test.dart
Swifty ef7cfbb860 refactor: AutoGPT Platform Stealth Launch Repo Re-Org (#8113)
Restructuring the Repo to make it clear the difference between classic autogpt and the autogpt platform:
* Move the "classic" projects `autogpt`, `forge`, `frontend`, and `benchmark` into a `classic` folder
  * Also rename `autogpt` to `original_autogpt` for absolute clarity
* Rename `rnd/` to `autogpt_platform/`
  * `rnd/autogpt_builder` -> `autogpt_platform/frontend`
  * `rnd/autogpt_server` -> `autogpt_platform/backend`
* Adjust any paths accordingly
2024-09-20 16:50:43 +02:00

27 lines
831 B
Dart

import 'package:auto_gpt_flutter_client/models/task_request_body.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
group('TaskRequestBody', () {
test('should create TaskRequestBody with correct values', () {
final taskRequestBody = TaskRequestBody(
input: 'Do something', additionalInput: {'key': 'value'});
expect(taskRequestBody.input, 'Do something');
expect(taskRequestBody.additionalInput, {'key': 'value'});
});
test('should convert TaskRequestBody to correct JSON', () {
final taskRequestBody = TaskRequestBody(
input: 'Do something', additionalInput: {'key': 'value'});
final json = taskRequestBody.toJson();
expect(json, {
'input': 'Do something',
'additional_input': {'key': 'value'}
});
});
});
}