summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authormiks <miks@cubesystems.lv>2011-12-29 21:44:16 +0200
committermiks <miks@cubesystems.lv>2011-12-29 21:44:16 +0200
commit723104c45f83937cd87bee87ac16d3dfc6ce4d88 (patch)
tree1b104bcea9ad4cfef2e0459bfb45d3e21d59a462 /spec
parent53ce00f74af1d0ac244b718b157f7f1c876e97a2 (diff)
downloadgitlab-ce-723104c45f83937cd87bee87ac16d3dfc6ce4d88.tar.gz
Initial deploy_key feature commit
Diffstat (limited to 'spec')
-rw-r--r--spec/models/deploy_key_spec.rb33
1 files changed, 33 insertions, 0 deletions
diff --git a/spec/models/deploy_key_spec.rb b/spec/models/deploy_key_spec.rb
new file mode 100644
index 00000000000..c20d0030b59
--- /dev/null
+++ b/spec/models/deploy_key_spec.rb
@@ -0,0 +1,33 @@
+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
+
+ describe "Methods" do
+ it { should respond_to :projects }
+ end
+
+ it { Factory.create(: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)
+#
+
+