On("Get", repositoryOwner, repositoryName, issueNumber).
					Return(pr, nil, nil)
			})

			ItSquashesPR(context, pr)
		})
	})
})

var ItSquashesPR = func(context WebhookTestContext, pr *github.PullRequest) {
	var (
		handle = context.Handle

		responseRecorder *httptest.ResponseRecorder
		repositories     *mocks.Repositories
		gitRepos         *mocks.Repos
		gitRepo          *mocks.Repo

		baseRef = *pr.Base.Ref
		headRef = *pr.Head.Ref
		headSHA = *pr.Head.SHA
	)

	BeforeEach(func() {
		responseRecorder = *context.ResponseRecorder
		repositories = *context.Repositories
		gitRepos = *context.GitRepos

		gitRepo = new(mocks.Repo)
		gitRepos.
			On("GetUpdatedRepo", sshURL, repositoryOwner, repositoryName).
			Return(gitRepo, nil)
	"github.com/salemove/github-review-helper/mocks"
	"github.com/stretchr/testify/mock"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = TestWebhookHandler(func(context WebhookTestContext) {
	noSquashOpts := &github.PullRequestOptions{MergeMethod: "merge"}

	Describe("!merge comment", func() {
		var (
			handle      = context.Handle
			headers     = context.Headers
			requestJSON = context.RequestJSON

			responseRecorder *httptest.ResponseRecorder
			pullRequests     *mocks.PullRequests
			repositories     *mocks.Repositories
			issues           *mocks.Issues
		)
		BeforeEach(func() {
			responseRecorder = *context.ResponseRecorder
			pullRequests = *context.PullRequests
			repositories = *context.Repositories
			issues = *context.Issues
		})

		headers.Is(func() map[string]string {
			return map[string]string{
				"X-Github-Event": "issue_comment",
			}