Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanoltman committed Jan 3, 2025
1 parent 0799861 commit 68f7d84
Showing 1 changed file with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,27 @@ void main() {
});

group('assertArgsAreValid', () {
// TODO
group('when release-version is passed', () {
setUp(() {
when(() => argResults.wasParsed('release-version')).thenReturn(true);
});

test('logs error and exits with usage err', () async {
await expectLater(
() => runWithOverrides(releaser.assertArgsAreValid),
exitsWithCode(ExitCode.usage),
);

verify(
() => logger.err(
'''
The "--release-version" flag is only supported for aar and ios-framework releases.
To change the version of this release, change your app's version in your pubspec.yaml.''',
),
).called(1);
});
});
});

group('assertPreconditions', () {
Expand Down

0 comments on commit 68f7d84

Please sign in to comment.