osem-fcy/spec/factories/question.rb
Aditya Prakash ccc28cdc90 Add test for QuestionsController
new method was dead code.
@questions_conference was dead variable.
assignment of question's foreign key was unnecessary.
fixes in type of flash messages.
2016-02-25 12:42:55 +05:30

14 lines
330 B
Ruby

# Read about factories at https://github.com/thoughtbot/factory_girl
FactoryGirl.define do
factory :question do
title 'blah'
question_type_id 1
question_type
global false
after(:build) do |question|
question.answers << build(:answer)
question.conferences << build(:conference)
end
end
end