search for: concept_id

Displaying 3 results from an estimated 3 matches for "concept_id".

Did you mean: concept_
2006 May 19
1
Need help with a test
Hi, I have this controller method that I need to test: def link_concept_to_client concept_to_link = Concept.find(params[:concept_id]) # take all the variations for the concept for variation in concept_to_link.variations new_client_variation = ClientVariation.new new_client_variation.client = session[:active_client] new_client_variation.variation = variation new_client_variation.name_fr = variatio...
2006 May 06
6
assert_raises --> how does it work?
Hi, I have this code fragment: def test_delete_concept assert_not_nil Concept.find(concepts(:entreprise).id) get :delete_concept, {:concept_id => concepts(:entreprise).id} assert_raises :RecordNotFound, Concept.find(concepts(:entreprise).id) end basicaly, on the first line, I make sure that the concept exist in the DB. On the second line I delete the concept fron the DB. Finaly, this is where I have a problem, on the third li...
2006 May 17
0
teardown not cleaning the BD?
...eleted. When I look at the DB, the record is still there. The test goes like this: def test_delete_concept #make sure the concept record is present assert_not_nil Concept.find(concepts(:entreprise).id) #make sure the variations record is present assert_not_nil Variation.find_by_concept_id (concepts(:entreprise).id) #find a client_variation first_variation = Variation.find_by_concept_id (concepts(:entreprise).id, :limit => 1) #make sure it is present assert_not_nil ClientVariation.find_by_variation_id (first_variation.id) #delete the record from the DB g...