Skip to content

Commit

Permalink
feat(#1682): Check release name in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed May 10, 2023
1 parent c6432cd commit c54ae12
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/test/java/com/rultor/agents/github/CommentsTagTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,22 +99,25 @@ public void duplicatesRelease() throws Exception {
@Test
public void createsReleaseMessage() throws Exception {
final Repo repo = new MkGithub().randomRepo();
final Issue issue = repo.issues().create("", "");
final Issue issue = repo.issues().create("Issue title", "");
final Agent agent = new CommentsTag(repo.github());
final String tag = "v1.5";
final Talk talk = CommentsTagTest.talk(issue, tag);
agent.execute(talk);
final Release.Smart smart = new Release.Smart(
new Releases.Smart(repo.releases()).find(tag)
);
final String body = smart.body();
MatcherAssert.assertThat(
new Release.Smart(
new Releases.Smart(repo.releases()).find(tag)
).body(),
body,
Matchers.allOf(
Matchers.containsString("Released by Rultor"),
Matchers.containsString(
"see [build log](https://www.rultor.com/t/1-abcdef)"
)
)
);
MatcherAssert.assertThat(smart.name(), Matchers.equalTo("Issue title"));
}

/**
Expand Down

0 comments on commit c54ae12

Please sign in to comment.