New to Coldbox and having an issue with a test

I’m working my way through the Zero to Hero course on CFCast but have got stuck with a unit test that fails in Episode 30 (Hands-On Step 9).

I’m seeing an error in the integration that says:
" Invalid HTTP Method: 'GET’The requested URL: registration/ cannot be executed using the incoming HTTP request method ‘GET’"

I can’t see anything that specifies the Method in either the test or the code. Can anyone point me in the right direction, please?

Looks like it might be related to the tests in step 8, you have a route /registration/new which can handle a get, and you have a post to /registration.

In step 9, you should have added the resources( "registration" ) which will set the rules for those routes.

So check your tests to make sure they have the POST to registration.

That might be it.
Might not be, might need some code to debug any more.

Thanks Gavin, that fixed it. I had only=… set which I must have seen somewhere. Removed it as per the instructions and it now passes

Ok great, glad that worked. Online workshops are great, until you have an error and you aren’t in the classroom with someone to help you troubleshoot.

Hope you are getting a lot out of the Workshop!


I am getting a lot out of it but ColdBox is very different to what I have been doing in CFML. I may have to do it twice.