Commit e55ba527 authored by Long Nguyen's avatar Long Nguyen

Fix broken specs

parent b11cf899
...@@ -47,14 +47,14 @@ describe ProjectMember, models: true do ...@@ -47,14 +47,14 @@ describe ProjectMember, models: true do
end end
it "destroy itself and delete associated todos" do it "destroy itself and delete associated todos" do
expect(owner.todos.size).to eq(2) expect(owner.user.todos.size).to eq(2)
expect(master.todos.size).to eq(3) expect(master.user.todos.size).to eq(3)
expect(Todo.count).to eq(5) expect(Todo.count).to eq(5)
master_todo_ids = master_todos.map(&:id) master_todo_ids = master_todos.map(&:id)
master.destroy master.destroy
expect(owner.todos.size).to eq(2) expect(owner.user.todos.size).to eq(2)
expect(Todo.count).to eq(2) expect(Todo.count).to eq(2)
master_todo_ids.each do |id| master_todo_ids.each do |id|
expect(Todo.exists?(id)).to eq(false) expect(Todo.exists?(id)).to eq(false)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment