FFFF
Hi! I am writing a few tests of my app and I facing an issue
using Bukdu using Test struct IndexController <: ApplicationController conn::Conn end function something(c::IndexController) data = c.conn.params[:data] return Bukdu.render(JSON, Dict("status"=>data=="data")) end function config_routes() routes() do post("/something", IndexController, something) end end function test_something() config_routes() response = Bukdu.Router.call(post, "/something", ["Content-Type" => "application/json"], JSON.json(Dict("data"=>"data"))) @test response.got["message"] = true end test_something()
And I got a INFO: POST MissingController not_found 404 /something
INFO: POST MissingController not_found 404 /something
I solved using invokelatest
invokelatest
response = Base.invokelatest(Bukdu.Router.call, post, "/something", ["Content-Type" => "application/json"], JSON.json(Dict("data"=>"data")))
Is this intended, should I be testing in a different way?
fix #87 invokelatest Router.call
Merge pull request #88 from wookay/fix_router_call
Activity
fix #87 invokelatest Router.call
Merge pull request #88 from wookay/fix_router_call