Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-08-25 13:25:02 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-08-25 13:25:02 +0400
commit92deb451da16bdc1b9520fc06f593b7e373d81af (patch)
tree9ad16b93f636395b6e97936912d3009c89ed8b45 /spec
parent1a9b2a47a139f2e683873c5d46cea15161e35783 (diff)
Annotate models
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec')
-rw-r--r--spec/factories/label_links.rb12
-rw-r--r--spec/factories/labels.rb12
-rw-r--r--spec/factories/merge_requests.rb22
-rw-r--r--spec/factories/notes.rb19
-rw-r--r--spec/factories/projects.rb28
-rw-r--r--spec/models/label_link_spec.rb12
-rw-r--r--spec/models/label_spec.rb12
-rw-r--r--spec/models/merge_request_spec.rb1
-rw-r--r--spec/models/project_spec.rb2
9 files changed, 120 insertions, 0 deletions
diff --git a/spec/factories/label_links.rb b/spec/factories/label_links.rb
index d6b6f8581f6..bd304b5db6b 100644
--- a/spec/factories/label_links.rb
+++ b/spec/factories/label_links.rb
@@ -1,3 +1,15 @@
+# == Schema Information
+#
+# Table name: label_links
+#
+# id :integer not null, primary key
+# label_id :integer
+# target_id :integer
+# target_type :string(255)
+# created_at :datetime
+# updated_at :datetime
+#
+
# Read about factories at https://github.com/thoughtbot/factory_girl
FactoryGirl.define do
diff --git a/spec/factories/labels.rb b/spec/factories/labels.rb
index af9f3efa641..6829387c660 100644
--- a/spec/factories/labels.rb
+++ b/spec/factories/labels.rb
@@ -1,3 +1,15 @@
+# == Schema Information
+#
+# Table name: labels
+#
+# id :integer not null, primary key
+# title :string(255)
+# color :string(255)
+# project_id :integer
+# created_at :datetime
+# updated_at :datetime
+#
+
# Read about factories at https://github.com/thoughtbot/factory_girl
FactoryGirl.define do
diff --git a/spec/factories/merge_requests.rb b/spec/factories/merge_requests.rb
index 3319262c015..0ae8ea5f878 100644
--- a/spec/factories/merge_requests.rb
+++ b/spec/factories/merge_requests.rb
@@ -1,3 +1,25 @@
+# == Schema Information
+#
+# Table name: merge_requests
+#
+# id :integer not null, primary key
+# target_branch :string(255) not null
+# source_branch :string(255) not null
+# source_project_id :integer not null
+# author_id :integer
+# assignee_id :integer
+# title :string(255)
+# created_at :datetime
+# updated_at :datetime
+# milestone_id :integer
+# state :string(255)
+# merge_status :string(255)
+# target_project_id :integer not null
+# iid :integer
+# description :text
+# position :integer default(0)
+#
+
FactoryGirl.define do
factory :merge_request do
title
diff --git a/spec/factories/notes.rb b/spec/factories/notes.rb
index a55ccf289dd..83d0cc62dbf 100644
--- a/spec/factories/notes.rb
+++ b/spec/factories/notes.rb
@@ -1,3 +1,22 @@
+# == 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
diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb
index 353d9d645ef..5324654c48c 100644
--- a/spec/factories/projects.rb
+++ b/spec/factories/projects.rb
@@ -1,3 +1,31 @@
+# == Schema Information
+#
+# Table name: projects
+#
+# id :integer not null, primary key
+# name :string(255)
+# path :string(255)
+# description :text
+# created_at :datetime
+# updated_at :datetime
+# creator_id :integer
+# issues_enabled :boolean default(TRUE), not null
+# wall_enabled :boolean default(TRUE), not null
+# merge_requests_enabled :boolean default(TRUE), not null
+# wiki_enabled :boolean default(TRUE), not null
+# namespace_id :integer
+# issues_tracker :string(255) default("gitlab"), not null
+# issues_tracker_id :string(255)
+# snippets_enabled :boolean default(TRUE), not null
+# last_activity_at :datetime
+# import_url :string(255)
+# visibility_level :integer default(0), not null
+# archived :boolean default(FALSE), not null
+# import_status :string(255)
+# repository_size :float default(0.0)
+# star_count :integer default(0), not null
+#
+
FactoryGirl.define do
factory :empty_project, class: 'Project' do
sequence(:name) { |n| "project#{n}" }
diff --git a/spec/models/label_link_spec.rb b/spec/models/label_link_spec.rb
index 078e61a7d62..0db60432ad3 100644
--- a/spec/models/label_link_spec.rb
+++ b/spec/models/label_link_spec.rb
@@ -1,3 +1,15 @@
+# == Schema Information
+#
+# Table name: label_links
+#
+# id :integer not null, primary key
+# label_id :integer
+# target_id :integer
+# target_type :string(255)
+# created_at :datetime
+# updated_at :datetime
+#
+
require 'spec_helper'
describe LabelLink do
diff --git a/spec/models/label_spec.rb b/spec/models/label_spec.rb
index 1d273e59bde..31634648f04 100644
--- a/spec/models/label_spec.rb
+++ b/spec/models/label_spec.rb
@@ -1,3 +1,15 @@
+# == Schema Information
+#
+# Table name: labels
+#
+# id :integer not null, primary key
+# title :string(255)
+# color :string(255)
+# project_id :integer
+# created_at :datetime
+# updated_at :datetime
+#
+
require 'spec_helper'
describe Label do
diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb
index ec6d29de82b..c40f75290ed 100644
--- a/spec/models/merge_request_spec.rb
+++ b/spec/models/merge_request_spec.rb
@@ -17,6 +17,7 @@
# target_project_id :integer not null
# iid :integer
# description :text
+# position :integer default(0)
#
require 'spec_helper'
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 82ab97cdd7a..1c11ac39567 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -22,6 +22,8 @@
# visibility_level :integer default(0), not null
# archived :boolean default(FALSE), not null
# import_status :string(255)
+# repository_size :float default(0.0)
+# star_count :integer default(0), not null
#
require 'spec_helper'