Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove unnecessary await
  • Loading branch information
yjbanov committed Jan 22, 2025
commit 3025630c541a940d0260d8898ba85eca117efb43
Original file line number Diff line number Diff line change
Expand Up @@ -187,29 +187,29 @@ void main() {
test('Should process message when autosubmit label exists and pr is open', () async {
final PullRequest pullRequest = generatePullRequest(prNumber: 0, repoName: slug.name);
githubService.pullRequestData = pullRequest;
expect(await validationService.shouldProcess(pullRequest), true);
expect(validationService.shouldProcess(pullRequest), true);
});

test('Skip processing message when autosubmit label does not exist anymore', () async {
final PullRequest pullRequest = generatePullRequest(prNumber: 0, repoName: slug.name);
pullRequest.labels = <IssueLabel>[];
githubService.pullRequestData = pullRequest;
expect(await validationService.shouldProcess(pullRequest), false);
expect(validationService.shouldProcess(pullRequest), false);
});

test('Skip processing message when the pull request is closed', () async {
final PullRequest pullRequest = generatePullRequest(prNumber: 0, repoName: slug.name);
pullRequest.state = 'closed';
githubService.pullRequestData = pullRequest;
expect(await validationService.shouldProcess(pullRequest), false);
expect(validationService.shouldProcess(pullRequest), false);
});

test('Should not process message when revert label exists and pr is open', () async {
final PullRequest pullRequest = generatePullRequest(prNumber: 0, repoName: slug.name);
final IssueLabel issueLabel = IssueLabel(name: 'revert');
pullRequest.labels = <IssueLabel>[issueLabel];
githubService.pullRequestData = pullRequest;
expect(await validationService.shouldProcess(pullRequest), false);
expect(validationService.shouldProcess(pullRequest), false);
});

test('Skip processing message when revert label exists and pr is closed', () async {
Expand All @@ -218,7 +218,7 @@ void main() {
final IssueLabel issueLabel = IssueLabel(name: 'revert');
pullRequest.labels = <IssueLabel>[issueLabel];
githubService.pullRequestData = pullRequest;
expect(await validationService.shouldProcess(pullRequest), false);
expect(validationService.shouldProcess(pullRequest), false);
});
});

Expand Down