making two requests to the same controller in rails integrations specs

后端 未结 5 2121
鱼传尺愫
鱼传尺愫 2021-02-12 19:17

I\'m having problem making two requests to the same url in a rails integration test, with rspec

it \'does something\' do

  # get \'/something\', {:status=>\'         


        
5条回答
  •  没有蜡笔的小新
    2021-02-12 19:47

    rails integration tests should be written so that the on case tests the one single request - response cycle. we can check redirects. but if you have to do something like

    get '/something', {:status=>'any_other'}, @header

    get '/something', {:status=>'ok'}, @header

    You should write two different cases for this.

提交回复
热议问题