summaryrefslogtreecommitdiff
path: root/spec/factories/merge_requests.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/factories/merge_requests.rb')
-rw-r--r--spec/factories/merge_requests.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/factories/merge_requests.rb b/spec/factories/merge_requests.rb
index ca1c636fce4..e281e2f227b 100644
--- a/spec/factories/merge_requests.rb
+++ b/spec/factories/merge_requests.rb
@@ -51,11 +51,20 @@ FactoryGirl.define do
trait :with_diffs do
end
+ trait :without_diffs do
+ source_branch "improve/awesome"
+ target_branch "master"
+ end
+
trait :conflict do
source_branch "feature_conflict"
target_branch "feature"
end
+ trait :merged do
+ state :merged
+ end
+
trait :closed do
state :closed
end
@@ -84,6 +93,7 @@ FactoryGirl.define do
merge_user author
end
+ factory :merged_merge_request, traits: [:merged]
factory :closed_merge_request, traits: [:closed]
factory :reopened_merge_request, traits: [:reopened]
factory :merge_request_with_diffs, traits: [:with_diffs]