Skip to content

Commit

Permalink
add common name to tests/fixtures for plants
Browse files Browse the repository at this point in the history
  • Loading branch information
one-m1nd committed Mar 6, 2024
1 parent 0889447 commit 3237285
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/controllers/plants_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions test/fixtures/plants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

one:
name: PlantOne
common_name: null
genus_id: 1
family_id: 1
status_id: 1
year_acquired: 2017

two:
name: PlantTwo
common_name: null
genus_id: 2
family_id: 2
status_id: 2
Expand Down

0 comments on commit 3237285

Please sign in to comment.