Skip to content

Commit

Permalink
Change update test so comment about reloading from the db makes more …
Browse files Browse the repository at this point in the history
…sense
  • Loading branch information
jmaddox19 authored Apr 30, 2020
1 parent 3e777b5 commit f76bec0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 08-rails/testing-db-in-controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ We will also need to create a test in which the params are invalid or missing.
}
}
it "will update a model with a valid post request" do
id = Book.first.id
book = Book.first
expect {
patch book_path(id), params: new_book_hash
patch book_path(book.id), params: new_book_hash
}.wont_change "Book.count"
must_respond_with :redirect
Expand Down

0 comments on commit f76bec0

Please sign in to comment.