Ruby Build a Todo List Application with Rails 4 Build a Todo List Application with Rails 4 Write Our First Tests

adrian silva
adrian silva
4,959 Points

Help with error

Failures:

1) Create todo lists redirects to the todo list index page on success Failure/Error: expect(page).to have_content("New Todo list") expected to find text "New Todo list" in "New Todo List Title Description Back"

help please

2 Answers

Seth Kroger
Seth Kroger
56,361 Points

It looks like a capitalization issue. "New Todo list" vs. "New Todo List"

adrian silva
adrian silva
4,959 Points
require 'spec_helper'

describe "Create todo lists" do 
     it "redirects to the todo list index page on success" do
        visit "/todo_lists"
        click_link "New Todo list"
        expect(page).to have_content("New Todo list")

        fill_in "Title", with: "My todo list"
        fill_in "Description", with: "This is what I'm doing today."
        click_button "Create Todo list"

        expect(page).to have_content("My todo list")

    end
end