back to

Ruby on Rails To-do List

ARCHIVED

Archived: This project has been archived. Cards can no longer be completed.

Deleting To-do Lists

Stefy
Stefy completed this card.
Last updated
touch spec/features/todo_lists/destroy_spec.rb

require 'spec_helper'

describe "Delegint todo lists" do 
let!(:todo_list) { TodoList.create(title: "Groceries", description: "Grocery list")}

it "is sucessful when clicking the destroy link" do 
visit "/todo_lists"

within "#todo_list_#{todo_list.id}" do 
click_link "Destroy"
end
expect(page).to_not have_content(todo_list.title)
expect(TodoList.count).to eq(0)

end
end

  • Command do we use to run the entire test suite: rake spec