summaryrefslogtreecommitdiff
path: root/spec/models/service_spec.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-11-19 21:14:05 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-11-20 11:33:49 +0200
commitc3b074acab554fc40a8fcb6060ed7ab10e4171a4 (patch)
treeb524e4c96f998534522f2b4b4fea9994da8c6983 /spec/models/service_spec.rb
parentbe1dc5544a7840d17657d3d8fcecb0d0fd4401b5 (diff)
downloadgitlab-ce-c3b074acab554fc40a8fcb6060ed7ab10e4171a4.tar.gz
Service model and service hook
Diffstat (limited to 'spec/models/service_spec.rb')
-rw-r--r--spec/models/service_spec.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/models/service_spec.rb b/spec/models/service_spec.rb
new file mode 100644
index 00000000000..0329b9a94e3
--- /dev/null
+++ b/spec/models/service_spec.rb
@@ -0,0 +1,25 @@
+# == Schema Information
+#
+# Table name: services
+#
+# id :integer not null, primary key
+# type :string(255)
+# title :string(255)
+# token :string(255)
+# project_id :integer not null
+# created_at :datetime not null
+# updated_at :datetime not null
+#
+
+require 'spec_helper'
+
+describe Service do
+ describe "Associations" do
+ it { should belong_to :project }
+ it { should have_one :service_hook }
+ end
+
+ describe "Mass assignment" do
+ it { should_not allow_mass_assignment_of(:project_id) }
+ end
+end