gitlabhq/spec/models/wiki_spec.rb

31 lines
682 B
Ruby
Raw Normal View History

2012-03-28 21:53:45 +02:00
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
#
2012-06-26 20:23:09 +02:00
# Table name: wikis
2012-03-28 21:53:45 +02:00
#
2012-06-26 20:23:09 +02:00
# id :integer(4) not null, primary key
2012-03-28 21:53:45 +02:00
# title :string(255)
# content :text
2012-06-26 20:23:09 +02:00
# project_id :integer(4)
# created_at :datetime not null
# updated_at :datetime not null
# slug :string(255)
# user_id :integer(4)
2012-03-28 21:53:45 +02:00
#