learn-co-curriculum / sinatra-fwitter-group-project

Other
2 stars 318 forks source link

application_controller_spec.rb:266 "/tweets/new" -> "/tweets" #8

Closed onyoo closed 8 years ago

onyoo commented 8 years ago

Line 265 currently reads:

expect(page.current_path).to eq("/tweets/new")

But our fuzzy friend, Capybara, already visited that path, and clicked submit. We should then find ourselves at the tweets index page. The test works better if it reads:

expect(page.current_path).to eq("/tweets")
victhevenot commented 8 years ago

Hey @onyoo. This test is saying that if a user tries to create a new tweet with blank content, the tweet won't be created and instead will redirect back to the /tweets/new page so that the user can have an opportunity to create a tweet with content. I'm going to close this issue, but please let me know if you have any other questions about it!