diff --git a/test/controllers/plants_controller_test.rb b/test/controllers/plants_controller_test.rb index a07b8bb..bb3b078 100644 --- a/test/controllers/plants_controller_test.rb +++ b/test/controllers/plants_controller_test.rb @@ -17,7 +17,7 @@ class PlantsControllerTest < ActionDispatch::IntegrationTest test "should create plant" do assert_difference("Plant.count") do - post plants_url, params: { plant: { name: 'PlantThree', family_id: 1, genus_id: 1, status_id: 1, year_acquired: 2017 } } + post plants_url, params: { plant: { name: 'PlantThree', family_id: 1, genus_id: 1, status_id: 1, year_acquired: 2017, common_name: 'tres' } } end assert_redirected_to plant_url(Plant.last) diff --git a/test/fixtures/plants.yml b/test/fixtures/plants.yml index 0971502..1f21748 100644 --- a/test/fixtures/plants.yml +++ b/test/fixtures/plants.yml @@ -2,6 +2,7 @@ one: name: PlantOne + common_name: null genus_id: 1 family_id: 1 status_id: 1 @@ -9,6 +10,7 @@ one: two: name: PlantTwo + common_name: null genus_id: 2 family_id: 2 status_id: 2