Github: simplify

This commit is contained in:
Aleksey Pivovarov
2013-08-20 10:45:36 +04:00
parent a2824168b0
commit 9fbcf81c55
2 changed files with 7 additions and 18 deletions
@@ -26,15 +26,9 @@ public class GithubCreatePullRequestTest extends GithubCreatePullRequestTestBase
public void testSimple() throws Exception {
registerDefaultCreatePullRequestDialogHandler(myLogin1 + ":master");
cd(myProjectRoot.getPath());
cloneRepo();
createBranch();
createChanges();
GithubCreatePullRequestAction.createPullRequest(myProject, myProjectRoot);
checkNotification(NotificationType.INFORMATION, "Successfully created pull request", null);
initGitChecks();
checkRemoteConfigured();
checkLastCommitPushed();
}
@@ -42,15 +36,9 @@ public class GithubCreatePullRequestTest extends GithubCreatePullRequestTestBase
public void testParent() throws Exception {
registerDefaultCreatePullRequestDialogHandler(myLogin2 + ":file2");
cd(myProjectRoot.getPath());
cloneRepo();
createBranch();
createChanges();
GithubCreatePullRequestAction.createPullRequest(myProject, myProjectRoot);
checkNotification(NotificationType.INFORMATION, "Successfully created pull request", null);
initGitChecks();
checkRemoteConfigured();
checkLastCommitPushed();
}
@@ -58,15 +46,9 @@ public class GithubCreatePullRequestTest extends GithubCreatePullRequestTestBase
public void testCommitRef1() throws Exception {
registerDefaultCreatePullRequestDialogHandler(myLogin1 + ":refs/heads/master");
cd(myProjectRoot.getPath());
cloneRepo();
createBranch();
createChanges();
GithubCreatePullRequestAction.createPullRequest(myProject, myProjectRoot);
checkNotification(NotificationType.INFORMATION, "Successfully created pull request", null);
initGitChecks();
checkRemoteConfigured();
checkLastCommitPushed();
}
@@ -30,6 +30,7 @@ import org.jetbrains.plugins.github.util.GithubUtil;
import java.util.Random;
import static com.intellij.dvcs.test.Executor.cd;
import static git4idea.test.GitExecutor.git;
/**
@@ -48,6 +49,12 @@ public abstract class GithubCreatePullRequestTestBase extends GithubTest {
BRANCH_NAME = "branch_" + getTestName(false) + "_" + DateFormatUtil.formatDate(time).replace('/', '-') + "_" + rnd.nextLong();
registerHttpAuthService();
cd(myProjectRoot.getPath());
cloneRepo();
createBranch();
createChanges();
initGitChecks();
}
@Override