autogpt / frontend /test /task_request_body_test.dart
kakumusic's picture
Upload folder using huggingface_hub
b225a21 verified
raw
history blame contribute delete
831 Bytes
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'}
});
});
});
}