diff --git a/spec/factories/topic.rb b/spec/factories/topic.rb index 159059b..1eb1820 100644 --- a/spec/factories/topic.rb +++ b/spec/factories/topic.rb @@ -1,5 +1,10 @@ FactoryGirl.define do factory :topic do sequence(:title) { |n| "Forum Title #{n}" } + forum + user + before(:create) do |topic| + topic.first_post = "My first post on the topic" + end end end \ No newline at end of file diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 0931978..49f261c 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -19,6 +19,7 @@ # time_zone :string(255) # version :integer # public_email :boolean default(FALSE), not null +# salt :string(255) # require 'spec_helper'