diff options
author | Petteri Räty <betelgeuse@gentoo.org> | 2011-03-12 21:13:18 +0200 |
---|---|---|
committer | Petteri Räty <betelgeuse@gentoo.org> | 2011-03-12 21:13:18 +0200 |
commit | c38161f8d317aee036f197a9b670f96dcd4c9ec3 (patch) | |
tree | 3ba7b4cd90a3bb5ea4a351c3c3221fd8de8603fd /features | |
parent | Rename QuestionCategory to Category (diff) | |
download | recruiting-webapp-c38161f8d317aee036f197a9b670f96dcd4c9ec3.tar.gz recruiting-webapp-c38161f8d317aee036f197a9b670f96dcd4c9ec3.tar.bz2 recruiting-webapp-c38161f8d317aee036f197a9b670f96dcd4c9ec3.zip |
Questions can belong to many categories
While starting to input quiz questions for the arch tester quizzes we
found out that it would be best if questions could belong to many
categories. Now the relationship between questions and categories is
many to many. Bug #356179.
Diffstat (limited to 'features')
-rw-r--r-- | features/clean_ui.feature | 2 | ||||
-rw-r--r-- | features/step_definitions/questions_steps.rb | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/features/clean_ui.feature b/features/clean_ui.feature index 237136e..f475abf 100644 --- a/features/clean_ui.feature +++ b/features/clean_ui.feature @@ -63,7 +63,7 @@ Feature: Clean UI Given following questions: |question 1|category| - |question 3|category| + |question 2|category| |question 3|category| Given email question content for "question 1" Given text content "something" for question "question 2" diff --git a/features/step_definitions/questions_steps.rb b/features/step_definitions/questions_steps.rb index b0cd6fd..7f96e30 100644 --- a/features/step_definitions/questions_steps.rb +++ b/features/step_definitions/questions_steps.rb @@ -12,8 +12,7 @@ end Given /^a question "([^\"]*)" in category "([^\"]*)"$/ do |title, category| Given "a question \"#{title}\"" Given "a category \"#{category}\"" - @question.category = @category - @question.save! + QuestionCategory.create!(:category => @category, :question => @question) end Given /^a question "([^\"]*)" in group "([^\"]*)"$/ do |title, group| |