@@ -191,6 +191,38 @@ void main() {
191
191
throwsA (isA <PlatformException >()));
192
192
});
193
193
194
+ test ('send e-mail' , () async {
195
+ await launch (
'mailto:[email protected] ?subject=Hello' );
196
+ expect (
197
+ verify (await mock.launch (
198
+ any,
199
+ useSafariVC: anyNamed ('useSafariVC' ),
200
+ useWebView: anyNamed ('useWebView' ),
201
+ enableJavaScript: anyNamed ('enableJavaScript' ),
202
+ enableDomStorage: anyNamed ('enableDomStorage' ),
203
+ universalLinksOnly: anyNamed ('universalLinksOnly' ),
204
+ headers: anyNamed ('headers' ),
205
+ )),
206
+ isInstanceOf <VerificationResult >(),
207
+ );
208
+ });
209
+
210
+ test ('cannot send e-mail with forceSafariVC: true' , () async {
211
+ expect (
212
+ () async => await launch (
213
+ 'mailto:[email protected] ?subject=Hello' ,
214
+ forceSafariVC: true ),
215
+ throwsA (isA <PlatformException >()));
216
+ });
217
+
218
+ test ('cannot send e-mail with forceWebView: true' , () async {
219
+ expect (
220
+ () async => await launch (
221
+ 'mailto:[email protected] ?subject=Hello' ,
222
+ forceWebView: true ),
223
+ throwsA (isA <PlatformException >()));
224
+ });
225
+
194
226
test ('controls system UI when changing statusBarBrightness' , () async {
195
227
final TestWidgetsFlutterBinding binding =
196
228
TestWidgetsFlutterBinding .ensureInitialized ();
0 commit comments