alekseiismirnov / fp_api

Food Plan Generator API
Apache License 2.0
0 stars 0 forks source link

CRUD calls for food/product records #2

Open alekseiismirnov opened 3 months ago

alekseiismirnov commented 2 months ago
/app/fp_api $ bin/bundle exec rspec
*F

Pending: (Failures listed here are expected and do not affect your suite's status)

  1) Food add some examples to (or delete) /app/fp_api/spec/models/food_spec.rb
     # Not yet implemented
     # ./spec/models/food_spec.rb:4

Failures:

  1) Basic CRUD functionality can retrive all food
     Failure/Error: get api_v1_foods_path

     NameError:
       undefined local variable or method `api_v1_foods_path' for #<RSpec::ExampleGroups::BasicCRUDFunctionality "can retrive all food" (./spec/requests/products_crud_spec.rb:10)>
     # ./spec/requests/products_crud_spec.rb:11:in `block (2 levels) in <main>'

Finished in 1.06 seconds (files took 4.33 seconds to load)
2 examples, 1 failure, 1 pending

Failed examples:

rspec ./spec/requests/products_crud_spec.rb:10 # Basic CRUD functionality can retrive all food
alekseiismirnov commented 2 months ago
curl --request GET localhost:3000/api/v1/foods

[web] | Started GET "/api/v1/foods" for 10.89.1.7 at 2024-04-30 11:28:31 +0000
[web] | Processing by Api::V1::FoodsController#index as JSON
[web] | Completed 204 No Content in 0ms (ActiveRecord: 0.0ms | Allocations: 38)
alekseiismirnov commented 2 months ago

[web] | NoMethodError (undefined method json_responce' for #<Api::V1::FoodsController:0x00000000014cd0>): [web] | [web] | app/controllers/api/v1/foods_controller.rb:5:inindex' [web] | Started GET "/api/v1/foods" for 10.89.1.7 at 2024-05-01 08:26:39 +0000 [web] | Processing by Api::V1::FoodsController#index as JSON