Improve project remove spec

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-10-08 15:05:14 +03:00
parent 74217f753f
commit b485fdb5c1
No known key found for this signature in database
GPG Key ID: 161B5D6A44D3D88A
1 changed files with 6 additions and 2 deletions

View File

@ -10,8 +10,12 @@ describe "Projects", feature: true do
visit edit_project_path(@project)
end
it "should be correct path" do
expect { click_link "Remove project" }.to change {Project.count}.by(-1)
it "should be correct path", js: true do
expect {
click_link "Remove project"
fill_in 'confirm_name_input', with: @project.path
click_button 'Confirm'
}.to change {Project.count}.by(-1)
end
end
end