diff options
Diffstat (limited to 'spec/factories/notes.rb')
-rw-r--r-- | spec/factories/notes.rb | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/spec/factories/notes.rb b/spec/factories/notes.rb deleted file mode 100644 index f1c33461b55..00000000000 --- a/spec/factories/notes.rb +++ /dev/null @@ -1,65 +0,0 @@ -# == Schema Information -# -# Table name: notes -# -# id :integer not null, primary key -# note :text -# noteable_type :string(255) -# author_id :integer -# created_at :datetime -# updated_at :datetime -# project_id :integer -# attachment :string(255) -# line_code :string(255) -# commit_id :string(255) -# noteable_id :integer -# system :boolean default(FALSE), not null -# st_diff :text -# - -require_relative '../support/repo_helpers' - -FactoryGirl.define do - factory :note do - project - note "Note" - author - - factory :note_on_commit, traits: [:on_commit] - factory :note_on_commit_diff, traits: [:on_commit, :on_diff] - 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 - commit_id RepoHelpers.sample_commit.id - noteable_type "Commit" - end - - trait :on_diff do - line_code "0_184_184" - end - - trait :on_merge_request do - project factory: :project - noteable_id 1 - noteable_type "MergeRequest" - end - - trait :on_issue do - noteable_id 1 - 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 - end -end |