summaryrefslogtreecommitdiff
path: root/spec/factories
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-03-05 10:38:23 -0800
committerStan Hu <stanhu@gmail.com>2015-03-06 06:54:00 -0800
commit7e204cf389346d23e71bc4c2fa9e14cf82a7ed2e (patch)
treea0d85dcfb27c34aaede8c7183c9482248d6bee7f /spec/factories
parent8b53d9efe648f10e0572c2d8017489d0d3bb4755 (diff)
downloadgitlab-ce-7e204cf389346d23e71bc4c2fa9e14cf82a7ed2e.tar.gz
Added comment notification events to HipChat and Slack services.
Supports four different event types all bundled under the "note" event type: - comments on a commit - comments on an issue - comments on a merge request - comments on a code snippet
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/merge_requests.rb2
-rw-r--r--spec/factories/notes.rb6
2 files changed, 7 insertions, 1 deletions
diff --git a/spec/factories/merge_requests.rb b/spec/factories/merge_requests.rb
index 6ce1d7446fe..77cd37c22d9 100644
--- a/spec/factories/merge_requests.rb
+++ b/spec/factories/merge_requests.rb
@@ -40,7 +40,7 @@ FactoryGirl.define do
source_branch "master"
target_branch "feature"
- merge_status :can_be_merged
+ merge_status "can_be_merged"
trait :with_diffs do
end
diff --git a/spec/factories/notes.rb b/spec/factories/notes.rb
index 83d0cc62dbf..f1c33461b55 100644
--- a/spec/factories/notes.rb
+++ b/spec/factories/notes.rb
@@ -30,6 +30,7 @@ FactoryGirl.define do
factory :note_on_issue, traits: [:on_issue], aliases: [:votable_note]
factory :note_on_merge_request, traits: [:on_merge_request]
factory :note_on_merge_request_diff, traits: [:on_merge_request, :on_diff]
+ factory :note_on_project_snippet, traits: [:on_project_snippet]
trait :on_commit do
project factory: :project
@@ -52,6 +53,11 @@ FactoryGirl.define do
noteable_type "Issue"
end
+ trait :on_project_snippet do
+ noteable_id 1
+ noteable_type "Snippet"
+ end
+
trait :with_attachment do
attachment { fixture_file_upload(Rails.root + "spec/fixtures/dk.png", "`/png") }
end