diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-11-19 21:24:05 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-11-19 21:24:05 +0300 |
commit | 95c23b2f974ec15e89cd7e762c80af0fa0ce57a5 (patch) | |
tree | f37af5b6d4c92f9733298b6894dd6f24057e9cae /spec | |
parent | c3b074acab554fc40a8fcb6060ed7ab10e4171a4 (diff) | |
download | gitlab-ce-95c23b2f974ec15e89cd7e762c80af0fa0ce57a5.tar.gz |
Annotated. schema updated
Diffstat (limited to 'spec')
-rw-r--r-- | spec/factories.rb | 12 | ||||
-rw-r--r-- | spec/models/event_spec.rb | 6 | ||||
-rw-r--r-- | spec/models/group_spec.rb | 12 | ||||
-rw-r--r-- | spec/models/issue_spec.rb | 10 | ||||
-rw-r--r-- | spec/models/key_spec.rb | 6 | ||||
-rw-r--r-- | spec/models/merge_request_spec.rb | 22 | ||||
-rw-r--r-- | spec/models/milestone_spec.rb | 12 | ||||
-rw-r--r-- | spec/models/note_spec.rb | 6 | ||||
-rw-r--r-- | spec/models/project_spec.rb | 17 | ||||
-rw-r--r-- | spec/models/protected_branch_spec.rb | 10 | ||||
-rw-r--r-- | spec/models/snippet_spec.rb | 10 | ||||
-rw-r--r-- | spec/models/system_hook_spec.rb | 8 | ||||
-rw-r--r-- | spec/models/user_spec.rb | 30 | ||||
-rw-r--r-- | spec/models/users_project_spec.rb | 12 | ||||
-rw-r--r-- | spec/models/web_hook_spec.rb | 8 | ||||
-rw-r--r-- | spec/models/wiki_spec.rb | 6 |
16 files changed, 100 insertions, 87 deletions
diff --git a/spec/factories.rb b/spec/factories.rb index 7b2a2efab23..7c33f0ecc8b 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -132,4 +132,16 @@ FactoryGirl.define do name project end + + factory :service do + type "" + title "GitLab CI" + token "x56olispAND34ng" + project + end + + factory :service_hook do + url + service + end end diff --git a/spec/models/event_spec.rb b/spec/models/event_spec.rb index d68ebb8614b..49cb49db375 100644 --- a/spec/models/event_spec.rb +++ b/spec/models/event_spec.rb @@ -2,14 +2,14 @@ # # Table name: events # -# id :integer not null, primary key +# id :integer not null, primary key # target_type :string(255) # target_id :integer # title :string(255) # data :text # project_id :integer -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime not null +# updated_at :datetime not null # action :integer # author_id :integer # diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb index 5ae40658823..6ae2cb20169 100644 --- a/spec/models/group_spec.rb +++ b/spec/models/group_spec.rb @@ -2,12 +2,12 @@ # # Table name: groups # -# id :integer not null, primary key -# name :string(255) not null -# code :string(255) not null -# owner_id :integer not null -# created_at :datetime not null -# updated_at :datetime not null +# id :integer not null, primary key +# name :string(255) not null +# code :string(255) not null +# owner_id :integer not null +# created_at :datetime not null +# updated_at :datetime not null # require 'spec_helper' diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb index 9c69f8689c8..4c52a094386 100644 --- a/spec/models/issue_spec.rb +++ b/spec/models/issue_spec.rb @@ -2,15 +2,15 @@ # # Table name: issues # -# id :integer not null, primary key +# id :integer not null, primary key # title :string(255) # assignee_id :integer # author_id :integer # project_id :integer -# created_at :datetime not null -# updated_at :datetime not null -# closed :boolean default(FALSE), not null -# position :integer default(0) +# created_at :datetime not null +# updated_at :datetime not null +# closed :boolean default(FALSE), not null +# position :integer default(0) # branch_name :string(255) # description :text # milestone_id :integer diff --git a/spec/models/key_spec.rb b/spec/models/key_spec.rb index 80dfff08397..6d2310df5c0 100644 --- a/spec/models/key_spec.rb +++ b/spec/models/key_spec.rb @@ -2,10 +2,10 @@ # # Table name: keys # -# id :integer not null, primary key +# id :integer not null, primary key # user_id :integer -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime not null +# updated_at :datetime not null # key :text # title :string(255) # identifier :string(255) diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb index 4bf42ef99aa..d70647f668d 100644 --- a/spec/models/merge_request_spec.rb +++ b/spec/models/merge_request_spec.rb @@ -2,20 +2,20 @@ # # Table name: merge_requests # -# id :integer not null, primary key -# target_branch :string(255) not null -# source_branch :string(255) not null -# project_id :integer not null +# id :integer not null, primary key +# target_branch :string(255) not null +# source_branch :string(255) not null +# project_id :integer not null # author_id :integer # assignee_id :integer # title :string(255) -# closed :boolean default(FALSE), not null -# created_at :datetime not null -# updated_at :datetime not null -# st_commits :text(4294967295 -# st_diffs :text(4294967295 -# merged :boolean default(FALSE), not null -# state :integer default(1), not null +# closed :boolean default(FALSE), not null +# created_at :datetime not null +# updated_at :datetime not null +# st_commits :text(2147483647) +# st_diffs :text(2147483647) +# merged :boolean default(FALSE), not null +# state :integer default(1), not null # milestone_id :integer # diff --git a/spec/models/milestone_spec.rb b/spec/models/milestone_spec.rb index 0e5cf7dd665..431985d0d46 100644 --- a/spec/models/milestone_spec.rb +++ b/spec/models/milestone_spec.rb @@ -2,14 +2,14 @@ # # Table name: milestones # -# id :integer not null, primary key -# title :string(255) not null -# project_id :integer not null +# id :integer not null, primary key +# title :string(255) not null +# project_id :integer not null # description :text # due_date :date -# closed :boolean default(FALSE), not null -# created_at :datetime not null -# updated_at :datetime not null +# closed :boolean default(FALSE), not null +# created_at :datetime not null +# updated_at :datetime not null # require 'spec_helper' diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb index d739053748f..4f9352b9a14 100644 --- a/spec/models/note_spec.rb +++ b/spec/models/note_spec.rb @@ -2,13 +2,13 @@ # # Table name: notes # -# id :integer not null, primary key +# id :integer not null, primary key # note :text # noteable_id :string(255) # noteable_type :string(255) # author_id :integer -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime not null +# updated_at :datetime not null # project_id :integer # attachment :string(255) # line_code :string(255) diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 1cf4f586192..4f7afd9dd25 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -2,20 +2,20 @@ # # Table name: projects # -# id :integer not null, primary key +# id :integer not null, primary key # name :string(255) # path :string(255) # description :text -# created_at :datetime not null -# updated_at :datetime not null -# private_flag :boolean default(TRUE), not null +# created_at :datetime not null +# updated_at :datetime not null +# private_flag :boolean default(TRUE), not null # code :string(255) # owner_id :integer # default_branch :string(255) -# 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 +# 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 # group_id :integer # @@ -37,6 +37,7 @@ describe Project do it { should have_many(:hooks).dependent(:destroy) } it { should have_many(:wikis).dependent(:destroy) } it { should have_many(:protected_branches).dependent(:destroy) } + it { should have_many(:services).dependent(:destroy) } end describe "Mass assignment" do diff --git a/spec/models/protected_branch_spec.rb b/spec/models/protected_branch_spec.rb index 874c4e4d885..7340ce50ced 100644 --- a/spec/models/protected_branch_spec.rb +++ b/spec/models/protected_branch_spec.rb @@ -2,11 +2,11 @@ # # Table name: protected_branches # -# id :integer not null, primary key -# project_id :integer not null -# name :string(255) not null -# created_at :datetime not null -# updated_at :datetime not null +# id :integer not null, primary key +# project_id :integer not null +# name :string(255) not null +# created_at :datetime not null +# updated_at :datetime not null # require 'spec_helper' diff --git a/spec/models/snippet_spec.rb b/spec/models/snippet_spec.rb index ada5fcdbcb8..b474d88c9e2 100644 --- a/spec/models/snippet_spec.rb +++ b/spec/models/snippet_spec.rb @@ -2,13 +2,13 @@ # # Table name: snippets # -# id :integer not null, primary key +# id :integer not null, primary key # title :string(255) # content :text -# author_id :integer not null -# project_id :integer not null -# created_at :datetime not null -# updated_at :datetime not null +# author_id :integer not null +# project_id :integer not null +# created_at :datetime not null +# updated_at :datetime not null # file_name :string(255) # expires_at :datetime # diff --git a/spec/models/system_hook_spec.rb b/spec/models/system_hook_spec.rb index 5f9239119b0..a99e91d34d0 100644 --- a/spec/models/system_hook_spec.rb +++ b/spec/models/system_hook_spec.rb @@ -2,12 +2,12 @@ # # Table name: web_hooks # -# id :integer not null, primary key +# id :integer not null, primary key # url :string(255) # project_id :integer -# created_at :datetime not null -# updated_at :datetime not null -# type :string(255) default("ProjectHook") +# created_at :datetime not null +# updated_at :datetime not null +# type :string(255) default("ProjectHook") # require "spec_helper" diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index b9654d7002c..4ac699b1c45 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -2,31 +2,31 @@ # # Table name: users # -# id :integer not null, primary key -# email :string(255) default(""), not null -# encrypted_password :string(128) default(""), not null +# id :integer not null, primary key +# email :string(255) default(""), not null +# encrypted_password :string(255) default(""), not null # reset_password_token :string(255) # reset_password_sent_at :datetime # remember_created_at :datetime -# sign_in_count :integer default(0) +# sign_in_count :integer default(0) # current_sign_in_at :datetime # last_sign_in_at :datetime # current_sign_in_ip :string(255) # last_sign_in_ip :string(255) -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime not null +# updated_at :datetime not null # name :string(255) -# admin :boolean default(FALSE), not null -# projects_limit :integer default(10) -# skype :string(255) default(""), not null -# linkedin :string(255) default(""), not null -# twitter :string(255) default(""), not null +# admin :boolean default(FALSE), not null +# projects_limit :integer default(10) +# skype :string(255) default(""), not null +# linkedin :string(255) default(""), not null +# twitter :string(255) default(""), not null # authentication_token :string(255) -# dark_scheme :boolean default(FALSE), not null -# theme_id :integer default(1), not null +# dark_scheme :boolean default(FALSE), not null +# theme_id :integer default(1), not null # bio :string(255) -# blocked :boolean default(FALSE), not null -# failed_attempts :integer default(0) +# blocked :boolean default(FALSE), not null +# failed_attempts :integer default(0) # locked_at :datetime # extern_uid :string(255) # provider :string(255) diff --git a/spec/models/users_project_spec.rb b/spec/models/users_project_spec.rb index 2ad9a0bd909..1f896324f18 100644 --- a/spec/models/users_project_spec.rb +++ b/spec/models/users_project_spec.rb @@ -2,12 +2,12 @@ # # Table name: users_projects # -# id :integer not null, primary key -# user_id :integer not null -# project_id :integer not null -# created_at :datetime not null -# updated_at :datetime not null -# project_access :integer default(0), not null +# id :integer not null, primary key +# user_id :integer not null +# project_id :integer not null +# created_at :datetime not null +# updated_at :datetime not null +# project_access :integer default(0), not null # require 'spec_helper' diff --git a/spec/models/web_hook_spec.rb b/spec/models/web_hook_spec.rb index 8f8decb81c6..aa040b5064f 100644 --- a/spec/models/web_hook_spec.rb +++ b/spec/models/web_hook_spec.rb @@ -2,12 +2,12 @@ # # Table name: web_hooks # -# id :integer not null, primary key +# id :integer not null, primary key # url :string(255) # project_id :integer -# created_at :datetime not null -# updated_at :datetime not null -# type :string(255) default("ProjectHook") +# created_at :datetime not null +# updated_at :datetime not null +# type :string(255) default("ProjectHook") # require 'spec_helper' diff --git a/spec/models/wiki_spec.rb b/spec/models/wiki_spec.rb index 96aebd2ddb7..9750b81d303 100644 --- a/spec/models/wiki_spec.rb +++ b/spec/models/wiki_spec.rb @@ -2,12 +2,12 @@ # # Table name: wikis # -# id :integer not null, primary key +# id :integer not null, primary key # title :string(255) # content :text # project_id :integer -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime not null +# updated_at :datetime not null # slug :string(255) # user_id :integer # |