summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorSebastian Ziebell <sebastian.ziebell@asquera.de>2013-02-08 10:32:42 +0100
committerSebastian Ziebell <sebastian.ziebell@asquera.de>2013-02-08 10:32:42 +0100
commit8045a81bcf5822f1992442750e1484a93c368229 (patch)
tree94ce2b257f3ba002ac1a0fde70b69b622304810d /spec/models
parent5d8a99f10429168e6471fdd1843f5045a10a84b3 (diff)
parent2f0a75ab77af430f682d67aa9bb865007d832795 (diff)
downloadgitlab-ce-8045a81bcf5822f1992442750e1484a93c368229.tar.gz
Merge branch 'master' into fixes/api
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/key_spec.rb4
-rw-r--r--spec/models/project_spec.rb5
-rw-r--r--spec/models/protected_branch_spec.rb15
-rw-r--r--spec/models/user_spec.rb2
-rw-r--r--spec/models/user_team_project_relationship_spec.rb12
-rw-r--r--spec/models/user_team_spec.rb12
-rw-r--r--spec/models/user_team_user_relationship_spec.rb13
7 files changed, 42 insertions, 21 deletions
diff --git a/spec/models/key_spec.rb b/spec/models/key_spec.rb
index 6d2310df5c0..94b952cf932 100644
--- a/spec/models/key_spec.rb
+++ b/spec/models/key_spec.rb
@@ -46,9 +46,9 @@ describe Key do
key.should_not be_valid
end
- it "does accept the same key for another project" do
+ it "does not accept the same key for another project" do
key = build(:key, project_id: 0)
- key.should be_valid
+ key.should_not be_valid
end
end
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 17bc988bf05..3dccb482375 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -8,7 +8,6 @@
# description :text
# created_at :datetime not null
# updated_at :datetime not null
-# private_flag :boolean default(TRUE), not null
# creator_id :integer
# default_branch :string(255)
# issues_enabled :boolean default(TRUE), not null
@@ -16,6 +15,7 @@
# merge_requests_enabled :boolean default(TRUE), not null
# wiki_enabled :boolean default(TRUE), not null
# namespace_id :integer
+# public :boolean default(FALSE), not null
#
require 'spec_helper'
@@ -42,7 +42,6 @@ describe Project do
describe "Mass assignment" do
it { should_not allow_mass_assignment_of(:namespace_id) }
it { should_not allow_mass_assignment_of(:creator_id) }
- it { should_not allow_mass_assignment_of(:private_flag) }
end
describe "Validation" do
@@ -78,8 +77,6 @@ describe Project do
it { should respond_to(:url_to_repo) }
it { should respond_to(:repo_exists?) }
it { should respond_to(:satellite) }
- it { should respond_to(:update_repository) }
- it { should respond_to(:destroy_repository) }
it { should respond_to(:observe_push) }
it { should respond_to(:update_merge_requests) }
it { should respond_to(:execute_hooks) }
diff --git a/spec/models/protected_branch_spec.rb b/spec/models/protected_branch_spec.rb
index c4d2e2f49f5..6e830393e32 100644
--- a/spec/models/protected_branch_spec.rb
+++ b/spec/models/protected_branch_spec.rb
@@ -24,19 +24,4 @@ describe ProtectedBranch do
it { should validate_presence_of(:project) }
it { should validate_presence_of(:name) }
end
-
- describe 'Callbacks' do
- let(:branch) { build(:protected_branch) }
-
- it 'call update_repository after save' do
- branch.should_receive(:update_repository)
- branch.save
- end
-
- it 'call update_repository after destroy' do
- branch.save
- branch.should_receive(:update_repository)
- branch.destroy
- end
- end
end
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 2ca82edf74e..8ab0a0343bb 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -31,6 +31,8 @@
# extern_uid :string(255)
# provider :string(255)
# username :string(255)
+# can_create_group :boolean default(TRUE), not null
+# can_create_team :boolean default(TRUE), not null
#
require 'spec_helper'
diff --git a/spec/models/user_team_project_relationship_spec.rb b/spec/models/user_team_project_relationship_spec.rb
index 81051d59971..86150cf305f 100644
--- a/spec/models/user_team_project_relationship_spec.rb
+++ b/spec/models/user_team_project_relationship_spec.rb
@@ -1,3 +1,15 @@
+# == Schema Information
+#
+# Table name: user_team_project_relationships
+#
+# id :integer not null, primary key
+# project_id :integer
+# user_team_id :integer
+# greatest_access :integer
+# created_at :datetime not null
+# updated_at :datetime not null
+#
+
require 'spec_helper'
describe UserTeamProjectRelationship do
diff --git a/spec/models/user_team_spec.rb b/spec/models/user_team_spec.rb
index 2d1b99db6f8..76d47f41498 100644
--- a/spec/models/user_team_spec.rb
+++ b/spec/models/user_team_spec.rb
@@ -1,3 +1,15 @@
+# == Schema Information
+#
+# Table name: user_teams
+#
+# id :integer not null, primary key
+# name :string(255)
+# path :string(255)
+# owner_id :integer
+# created_at :datetime not null
+# updated_at :datetime not null
+#
+
require 'spec_helper'
describe UserTeam do
diff --git a/spec/models/user_team_user_relationship_spec.rb b/spec/models/user_team_user_relationship_spec.rb
index 309f1975e51..981ad1e8873 100644
--- a/spec/models/user_team_user_relationship_spec.rb
+++ b/spec/models/user_team_user_relationship_spec.rb
@@ -1,3 +1,16 @@
+# == Schema Information
+#
+# Table name: user_team_user_relationships
+#
+# id :integer not null, primary key
+# user_id :integer
+# user_team_id :integer
+# group_admin :boolean
+# permission :integer
+# created_at :datetime not null
+# updated_at :datetime not null
+#
+
require 'spec_helper'
describe UserTeamUserRelationship do