Commit 6637894b authored by Lee Tickett's avatar Lee Tickett

Improve user_deletes_snippet_spec assertion

parent b3eca770
---
title: Improve delete snippet feature spec
merge_request: 51020
author: Lee Tickett @leetickett
type: other
......@@ -21,6 +21,8 @@ RSpec.describe 'Projects > Snippets > User deletes a snippet', :js do
click_button('Delete snippet')
wait_for_requests
expect(page).not_to have_content(snippet.title)
# This assertion also confirms we did not end up on an error page
expect(page).to have_selector('#new_snippet_link')
expect(project.snippets.length).to eq(0)
end
end
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