Merge pull request #2067 from riyad/diff-and-patch-for-commits-and-merge-requests
Diff and patch for commits and merge requests
This commit is contained in:
commit
e750efd9fc
14 changed files with 238 additions and 37 deletions
|
@ -70,7 +70,22 @@ FactoryGirl.define do
|
|||
closed true
|
||||
end
|
||||
|
||||
# pick 3 commits "at random" (from bcf03b5d~3 to bcf03b5d)
|
||||
trait :with_diffs do
|
||||
target_branch "bcf03b5d~3"
|
||||
source_branch "bcf03b5d"
|
||||
st_commits do
|
||||
[Commit.new(project.repo.commit('bcf03b5d')),
|
||||
Commit.new(project.repo.commit('bcf03b5d~1')),
|
||||
Commit.new(project.repo.commit('bcf03b5d~2'))]
|
||||
end
|
||||
st_diffs do
|
||||
project.repo.diff("bcf03b5d~3", "bcf03b5d")
|
||||
end
|
||||
end
|
||||
|
||||
factory :closed_merge_request, traits: [:closed]
|
||||
factory :merge_request_with_diffs, traits: [:with_diffs]
|
||||
end
|
||||
|
||||
factory :note do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue