Skip to content

Commit fad9c88

Browse files
committed
added spec for checking destroy when title does not match
1 parent 18b719f commit fad9c88

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spec/controllers/projects_controller_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,12 @@
147147
delete :destroy, params: {id: project.id}
148148
}.not_to change(Project, :count)
149149
end
150+
151+
it "does not delete the project when the title does not match" do
152+
expect {
153+
delete :destroy, params: {id: project.id, project: {title: "random title"}}
154+
}.not_to change(Project, :count)
155+
end
150156
end
151157

152158
describe "#show" do

0 commit comments

Comments
 (0)