Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-03-28 23:53:45 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-03-28 23:53:45 +0400
commit8ee0993fdf783ad12823ff817cd531df0bc363eb (patch)
tree83e7ecdc0f9779054dbd4d09bc820a0c3ab0b559 /spec/models/wiki_spec.rb
parentef32e01b4c365858582ba1c400bfba8b1558fd8d (diff)
Event & Wiki models specs
Diffstat (limited to 'spec/models/wiki_spec.rb')
-rw-r--r--spec/models/wiki_spec.rb31
1 files changed, 31 insertions, 0 deletions
diff --git a/spec/models/wiki_spec.rb b/spec/models/wiki_spec.rb
new file mode 100644
index 00000000000..05dbc972350
--- /dev/null
+++ b/spec/models/wiki_spec.rb
@@ -0,0 +1,31 @@
+require 'spec_helper'
+
+describe Wiki do
+ describe "Associations" do
+ it { should belong_to(:project) }
+ it { should belong_to(:user) }
+ end
+
+ describe "Validation" do
+ it { should validate_presence_of(:title) }
+ it { should validate_presence_of(:content) }
+ it { should validate_presence_of(:user_id) }
+ end
+
+ it { Factory(:wiki).should be_valid }
+end
+# == Schema Information
+#
+# Table name: snippets
+#
+# id :integer not null, primary key
+# title :string(255)
+# content :text
+# author_id :integer not null
+# project_id :integer not null
+# created_at :datetime
+# updated_at :datetime
+# file_name :string(255)
+# expires_at :datetime
+#
+