20 lines
483 B
Dart
20 lines
483 B
Dart
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:workouttest_util/model/cache.dart';
|
|
import 'package:workouttest_util/service/openai_service.dart';
|
|
|
|
|
|
void main() {
|
|
setUp(() {
|
|
Cache().setLocalBaseUrl();
|
|
});
|
|
|
|
test('openai response succesful', () async {
|
|
|
|
|
|
var api = OpenAIApi();
|
|
String response = await api.getOpenAICompletion("Who wrote the song 'yellow submarine'?");
|
|
print(response);
|
|
expect(response, matches(RegExp(r'Beatles') ));
|
|
});
|
|
}
|