ruby - CodeSchool APIs with Rails - Asserting response location is the same as the specific URL -


i'm doing codeschool surviving apis rails , i'm stuck on challenge. question asks "now, assert location response header url points newly created human resource. need parse response body, check test/test_helper.rb file on secondary tab helper method can save time." error message "make sure assert response location same humans human_url!" below code have far.

 class creatinghumanstest < actiondispatch::integrationtest   test 'creates human'       post '/humans', { human: { name: 'john', brain_type: 'small' } }.to_json,       { 'accept' => mime::json, 'content-type' => mime::json.to_s }      assert_equal 201, response.status     assert_equal mime::json, response.content_type     human = json(response.body)     assert_equal human_url(human[:id]), response.location    end end 

you have right ... believe there's screwy code on particular challenge.

i ran through , had click "check work" button on bottom of page. once clicked button, told me had completed it, etc. however, if used "normal" cmd+enter, gave me same error received.


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -