mirror of
https://github.com/thoughtbot/factory_bot.git
synced 2022-11-09 11:43:51 -05:00
Changed the integration test to check the old name bug
This commit is contained in:
parent
df6d2a0d09
commit
edd39c652c
2 changed files with 3 additions and 3 deletions
|
@ -11,7 +11,7 @@ class IntegrationTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
Factory.define :post do |f|
|
||||
f.title 'Test Post'
|
||||
f.name 'Test Post'
|
||||
f.author {|a| a.association(:user) }
|
||||
end
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ class CreateSchema < ActiveRecord::Migration
|
|||
end
|
||||
|
||||
create_table :posts, :force => true do |t|
|
||||
t.string :title
|
||||
t.string :name
|
||||
t.integer :author_id
|
||||
end
|
||||
end
|
||||
|
@ -27,6 +27,6 @@ class User < ActiveRecord::Base
|
|||
end
|
||||
|
||||
class Post < ActiveRecord::Base
|
||||
validates_presence_of :title, :author_id
|
||||
validates_presence_of :name, :author_id
|
||||
belongs_to :author, :class_name => 'User'
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue