Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

My rails website redirects are failing in the test phase but seem to be fine in normal

$
0
0

This is what rails test:controllers gets me.

Failure:StoriesControllerTest#test_adds_a_story [test/controllers/stories_controller_test.rb:42]:Expected response to be a redirect to <http://www.example.com/stories/980190962> but was a redirect to <http://www.example.com/stories/980190963>.Expected "http://www.example.com/stories/980190962" to be === "http://www.example.com/stories/980190963".

It seems to be offsetting the story url by one

This is the specific test that fails:assert_redirected_to story_url(@story)

I tried changing what the test should say but that leads to either errors or failures.


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>