73e848850c
Using the sed script from https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
21 lines
439 B
Ruby
21 lines
439 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'rails_helper'
|
|
|
|
describe 'User deletes snippet' do
|
|
let(:user) { create(:user) }
|
|
let(:content) { 'puts "test"' }
|
|
let(:snippet) { create(:personal_snippet, :public, content: content, author: user) }
|
|
|
|
before do
|
|
sign_in(user)
|
|
|
|
visit snippet_path(snippet)
|
|
end
|
|
|
|
it 'deletes the snippet' do
|
|
first(:link, 'Delete').click
|
|
|
|
expect(page).not_to have_content(snippet.title)
|
|
end
|
|
end
|