Chapter 10 Iteration E2 (handling errors)
31 Jul 2014, 07:52
Jason Hsu (12 posts)
The test did not pass, and I got the following error message:
1) Failure: CartsControllerTest#test_should_destroy_cart [/home/jhsu/depot/test/controllers/carts_controller_test.rb:43]: “Cart.count” didn’t change by -1. Expected: 1 Actual: 2
The first two suggestions listed at http://intertwingly.net/projects/AWDwR4/checkdepot-193-40/section-10.4.html were able to get the test to pass. Without these changes, the line item test fixtures were blank, and no session was specified.
The source code files needed are depot_i/test/fixtures/line_items.yml and depot_i/test/controllers/carts_controller_test.rb . With these two depot_i files copied to their corresponding paths in the app, the tests passed.
|You must be logged in to comment|