summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authormiks <miks@cubesystems.lv>2011-12-31 19:37:51 +0200
committermiks <miks@cubesystems.lv>2011-12-31 19:37:51 +0200
commitdf583bf12d4aa5bdffed6d43aa985e937e08e883 (patch)
treef05ce1b39941935cfd7b6e12ad75f56365322f03 /spec/models
parentb8b6515f935ffc9a27b7a735514dc39e8c092148 (diff)
downloadgitlab-ce-df583bf12d4aa5bdffed6d43aa985e937e08e883.tar.gz
Specs for deploy_keys updated
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/deploy_key_spec.rb29
-rw-r--r--spec/models/key_spec.rb2
2 files changed, 1 insertions, 30 deletions
diff --git a/spec/models/deploy_key_spec.rb b/spec/models/deploy_key_spec.rb
deleted file mode 100644
index 2c9641aeffd..00000000000
--- a/spec/models/deploy_key_spec.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-require 'spec_helper'
-
-describe DeployKey do
- describe "Associations" do
- it { should belong_to(:project) }
- end
-
- describe "Validation" do
- it { should validate_presence_of(:title) }
- it { should validate_presence_of(:key) }
- end
-
- it { Factory.create(:deploy_key,
- :project => Factory(:project)).should be_valid }
-end
-# == Schema Information
-#
-# Table name: deploy_keys
-#
-# id :integer not null, primary key
-# project_id :integer not null
-# created_at :datetime
-# updated_at :datetime
-# key :text
-# title :string(255)
-# identifier :string(255)
-#
-
-
diff --git a/spec/models/key_spec.rb b/spec/models/key_spec.rb
index 6522b825e14..dec0b9961a3 100644
--- a/spec/models/key_spec.rb
+++ b/spec/models/key_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe Key do
describe "Associations" do
- it { should belong_to(:user) }
+ it { should belong_to(:user) or belong_to(:project) }
end
describe "Validation" do