mirror of
https://github.com/foss42/apidash.git
synced 2025-05-21 00:09:55 +08:00
35 lines
864 B
Dart
35 lines
864 B
Dart
import 'package:curl_parser/curl_parser.dart';
|
|
import 'package:seed/seed.dart';
|
|
import 'package:test/test.dart';
|
|
|
|
void main() {
|
|
test('should not throw when form data entries are provided', () {
|
|
expect(
|
|
() => Curl(
|
|
uri: Uri.parse('https://api.apidash.dev/upload'),
|
|
method: 'POST',
|
|
form: true,
|
|
formData: [
|
|
FormDataModel(
|
|
name: "username", value: "john", type: FormDataType.text),
|
|
FormDataModel(
|
|
name: "password", value: "password", type: FormDataType.text),
|
|
],
|
|
),
|
|
returnsNormally,
|
|
);
|
|
});
|
|
|
|
test('should not throw when form data is null', () {
|
|
expect(
|
|
() => Curl(
|
|
uri: Uri.parse('https://api.apidash.dev/upload'),
|
|
method: 'POST',
|
|
form: false,
|
|
formData: null,
|
|
),
|
|
returnsNormally,
|
|
);
|
|
});
|
|
}
|