Skip to content

Commit

Permalink
Merge pull request #641 from carlosmiranda/636
Browse files Browse the repository at this point in the history
#641: pull request Issue #636 Randomized tag name for creation and patch
  • Loading branch information
Guard committed Mar 12, 2014
2 parents f7f34ac + 6bee73a commit a6aa4ec
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/test/java/com/jcabi/github/RtReleaseITCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@
*/
package com.jcabi.github;

import com.jcabi.aspects.Tv;
import java.io.IOException;
import javax.json.Json;
import javax.json.JsonObject;
import org.apache.commons.lang3.RandomStringUtils;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.After;
Expand Down Expand Up @@ -69,7 +71,9 @@ public void setUp() throws IOException {
this.repo = github.repos().get(
new Coordinates.Simple(System.getProperty("failsafe.github.repo"))
);
this.release = this.repo.releases().create("jcabi_test_tag");
this.release = this.repo.releases().create(
RandomStringUtils.randomAlphanumeric(Tv.TEN)
);
}

/**
Expand All @@ -90,7 +94,7 @@ public void tearDown() throws IOException {
@Test
public void canEditRelease() throws Exception {
final JsonObject patch = Json.createObjectBuilder()
.add("tag_name", "v23")
.add("tag_name", RandomStringUtils.randomAlphanumeric(Tv.TEN))
.add("name", "JCabi Github test release")
.add("body", "JCabi Github was here!")
.build();
Expand Down

0 comments on commit a6aa4ec

Please sign in to comment.