Skip to content

Commit

Permalink
#422 - Fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico Peeters committed Aug 7, 2018
1 parent e7593fe commit 6eab258
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ void generateMailTemplate() {
final ArgumentCaptor<Context> contextCaptor = ArgumentCaptor.forClass(Context.class);

when(requestService.findAllFor(projects, technologies, lastUpdatedSinceDays)).thenReturn(requests);
when(githubTemplateEngine.process(eq("notification-templates/open-requests"), any(Context.class))).thenReturn(template);
when(githubTemplateEngine.process(eq("notification-templates/open-requests_email"), any(Context.class))).thenReturn(template);

final String result = service.generateOpenRequestsMailTemplateFor(projects, technologies, lastUpdatedSinceDays);

assertThat(result).isEqualTo(template);
verify(githubTemplateEngine).process(eq("notification-templates/open-requests"), contextCaptor.capture());
verify(githubTemplateEngine).process(eq("notification-templates/open-requests_email"), contextCaptor.capture());
assertThat(contextCaptor.getValue().getVariable("requests")).isEqualTo(requests);
}
}

0 comments on commit 6eab258

Please sign in to comment.