summaryrefslogtreecommitdiff
path: root/spec/models/deploy_key_spec.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-05-06 15:09:26 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-05-06 15:09:26 +0300
commit42b86b79d0547d8d6f9f3fc8bc3414f7eb4a3964 (patch)
treed540a8e70183c34f1ed4af26e853e872c9193874 /spec/models/deploy_key_spec.rb
parentff346c01fac3eb0c588d493ac4c848340b4ec0c4 (diff)
downloadgitlab-ce-42b86b79d0547d8d6f9f3fc8bc3414f7eb4a3964.tar.gz
Model specs for DeployKeys
Diffstat (limited to 'spec/models/deploy_key_spec.rb')
-rw-r--r--spec/models/deploy_key_spec.rb25
1 files changed, 25 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..3658a6ff1d0
--- /dev/null
+++ b/spec/models/deploy_key_spec.rb
@@ -0,0 +1,25 @@
+# == Schema Information
+#
+# Table name: keys
+#
+# id :integer not null, primary key
+# user_id :integer
+# created_at :datetime not null
+# updated_at :datetime not null
+# key :text
+# title :string(255)
+# identifier :string(255)
+# project_id :integer
+#
+
+require 'spec_helper'
+
+describe DeployKey do
+ let(:project) { create(:project) }
+ let(:deploy_key) { create(:deploy_key, projects: [project]) }
+
+ describe "Associations" do
+ it { should have_many(:deploy_keys_projects) }
+ it { should have_many(:projects) }
+ end
+end