Created
January 17, 2012 13:28
-
-
Save wenbert/1626619 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AllergiesControllerTest < ActionController::TestCase | |
setup do | |
@allergy = allergies(:allergy_one) | |
@sample_allergy = { | |
:name => "allergy_name_sample", | |
:desc => "allergy_desc_sample", | |
:patient_id => @allergy.patient_id | |
} | |
end | |
test "should create allergy" do | |
assert_difference('Allergy.count') do | |
post :create, :post => @sample_allergy, :patient_id => @allergy.patient_id | |
end | |
# post :create, :post => @allergy, :patient_id => @allergy.patient_id | |
# Rails.logger.info Allergy.count.to_yaml | |
assert_redirected_to patients_path | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment