-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix e-mail urls * remove dot from test expectation
- Loading branch information
Showing
4 changed files
with
43 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -229,7 +229,12 @@ void main() { | |
final p = list.single; | ||
expect(p.uploaders, [hansUser.userId]); | ||
|
||
// TODO: check sent e-mail | ||
expect(fakeEmailSender.sentMessages, hasLength(1)); | ||
final email = fakeEmailSender.sentMessages.single; | ||
expect(email.recipients.single.email, '[email protected]'); | ||
expect(email.subject, 'Uploader invitation for package: hydrogen'); | ||
expect(email.bodyText, contains('https://pub.dev/packages/hydrogen\n')); | ||
|
||
// TODO: check consent (after migrating to consent API) | ||
}); | ||
}); | ||
|
@@ -444,7 +449,15 @@ void main() { | |
expect(pv.downloads, 0); | ||
expect(pv.sortOrder, 0); | ||
|
||
// TODO: check sent e-mail | ||
expect(fakeEmailSender.sentMessages, hasLength(1)); | ||
final email = fakeEmailSender.sentMessages.single; | ||
expect(email.recipients.single.email, hansUser.email); | ||
expect(email.subject, 'Package uploaded: new_package 1.2.3'); | ||
expect( | ||
email.bodyText, | ||
contains( | ||
'https://pub.dev/packages/new_package/versions/1.2.3\n')); | ||
|
||
// TODO: check history | ||
// TODO: check assets | ||
}); | ||
|
@@ -538,7 +551,13 @@ void main() { | |
await backend.repository.upload(Stream.fromIterable([tarball])); | ||
expect(version.packageName, foobarPackage.name); | ||
expect(version.versionString, '1.2.3'); | ||
// TODO: check sent e-mail | ||
|
||
expect(fakeEmailSender.sentMessages, hasLength(1)); | ||
final email = fakeEmailSender.sentMessages.single; | ||
expect(email.recipients.single.email, hansUser.email); | ||
expect(email.subject, 'Package uploaded: foobar_pkg 1.2.3'); | ||
expect(email.bodyText, | ||
contains('https://pub.dev/packages/foobar_pkg/versions/1.2.3\n')); | ||
|
||
final packages = await backend.latestPackages(); | ||
expect(packages.first.name, foobarPackage.name); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters