I'm new to testcafe and don't know if I am doing something wrong with my tests. When I call a post to my endpoint It seems the payload is lost somewhere in the proxy. Here is the request that is sent:
URL http://10.0.2.15:51286/H1KOcXmZW/http://localhost:3000/api/user_token
Request Method:POST
Remote Address:10.0.2.15:51286
Request Payload: {"username": "user", "password": "pass"}
However, when it makes it to the rails backend, this is the log from the request
Started POST "/api/user_token" for 172.18.0.1 at 2017-05-24 15:45:20 +0000
| Processing by Api::V1::UserTokenController#create as JSON
| User Load (1.6ms) SELECT `users`.* FROM `users` WHERE
`users`.`username` IS NULL LIMIT 1
| Unpermitted parameter: :format
| Completed 404 Not Found in 471ms (ActiveRecord: 12.9ms)
Note that the request to find the user is trying to select where users.username is NULL
It should be looking for where users.username is user
. This call works when I am not running through testcafe but something, I'm assuming the webproxy, is not configured right or not playing nicely but I don't know how to fix it or even where to start to fix it. Any help is appreciated.