search for: find_by_variation_id

Displaying 2 results from an estimated 2 matches for "find_by_variation_id".

2006 May 17
0
teardown not cleaning the BD?
...re 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 get :delete_concept, {:concept_id => concepts(:entreprise).id} #search for the record, if not there, raises an exception assert_raises(ActiveRecord::RecordNotFound) { Concept.find(concepts(:entreprise).id) } #search for th...
2006 May 19
1
Need help with a test
...iation.concept_id = new_concept.id new_variation.save #link it to the client get :link_concept_to_client, {:concept_id => new_concept.id}, {:active_client => clients(:air_canada)} #there should now be a client_variation for the variation assert_not_nil ClientVariation.find_by_variation_id(new_variation.id) assert_equal new_variation.name_fr, (ClientVariation.find_by_name_fr new_variation.name_fr).name_fr end Sorry for the blooted code, I had to decompose everything in small part to locate the problem... The error message is: NoMethodError: You have a nil object when you d...