Fix lint and typos

This commit is contained in:
HairyFotr
2017-08-08 20:27:30 +02:00
parent d8e0a06d93
commit 0149593272
30 changed files with 57 additions and 58 deletions

View File

@@ -18,7 +18,7 @@ class MergeServiceSpec extends FunSpec {
def initRepository(owner:String, name:String): File = {
val dir = createTestRepository(getRepositoryDir(owner, name))
using(Git.open(dir)){ git =>
createFile(git, s"refs/heads/master", "test.txt", "hoge" )
createFile(git, "refs/heads/master", "test.txt", "hoge" )
git.branchCreate().setStartPoint(s"refs/heads/master").setName(s"refs/pull/${issueId}/head").call()
}
dir

View File

@@ -11,15 +11,15 @@ class PullRequestServiceSpec extends FunSpec with ServiceSpecBase
describe("PullRequestService.getPullRequestFromBranch") {
it("""should
|return pull request if exists pull request from `branch` to `defaultBranch` and not closed.
|return pull request if exists pull request from `branch` to othre branch and not closed.
|return pull request if exists pull request from `branch` to other branch and not closed.
|return None if all pull request is closed""".stripMargin.trim) { withTestDB { implicit se =>
generateNewUserWithDBRepository("user1", "repo1")
generateNewUserWithDBRepository("user1", "repo2")
generateNewUserWithDBRepository("user2", "repo1")
generateNewPullRequest("user1/repo1/master", "user1/repo1/head2") // not target branch
generateNewPullRequest("user1/repo1/head1", "user1/repo1/master") // not target branch ( swap from, to )
generateNewPullRequest("user1/repo1/master", "user2/repo1/head1") // othre user
generateNewPullRequest("user1/repo1/master", "user1/repo2/head1") // othre repository
generateNewPullRequest("user1/repo1/master", "user2/repo1/head1") // other user
generateNewPullRequest("user1/repo1/master", "user1/repo2/head1") // other repository
val r1 = swap(generateNewPullRequest("user1/repo1/master2", "user1/repo1/head1"))
val r2 = swap(generateNewPullRequest("user1/repo1/master", "user1/repo1/head1"))
val r3 = swap(generateNewPullRequest("user1/repo1/master4", "user1/repo1/head1"))
@@ -31,4 +31,4 @@ class PullRequestServiceSpec extends FunSpec with ServiceSpecBase
assert(getPullRequestFromBranch("user1", "repo1", "head1", "master") == None)
} }
}
}
}

View File

@@ -32,7 +32,7 @@ class HelpersSpec extends FunSpec with MockitoSugar {
assert(after == """Example Project. <a href="http://example.com">http://example.com</a>""")
}
it("should convert a mulitple links within text") {
it("should convert a multiple links within text") {
val before = "Example Project. http://example.com. (See also https://github.com/)"
val after = detectAndRenderLinks(before, repository)
assert(after == """Example Project. <a href="http://example.com">http://example.com</a>. (See also <a href="https://github.com/">https://github.com/</a>)""")