debian-mirror-gitlab/spec/views/projects/imports/new.html.haml_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
749 B
Ruby
Raw Normal View History

2019-12-21 20:55:43 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
require "spec_helper"
2020-07-28 23:09:34 +05:30
RSpec.describe "projects/imports/new.html.haml" do
2017-08-17 22:00:37 +05:30
let(:user) { create(:user) }
context 'when import fails' do
2018-10-15 14:42:47 +05:30
let(:project) { create(:project_empty_repo, :import_failed, import_type: :gitlab_project, import_source: '/var/opt/gitlab/gitlab-rails/shared/tmp/project_exports/uploads/t.tar.gz', import_url: nil) }
2017-08-17 22:00:37 +05:30
before do
2020-10-24 23:57:45 +05:30
project.import_state.update!(last_error: '<a href="http://googl.com">Foo</a>')
2017-08-17 22:00:37 +05:30
sign_in(user)
2018-11-18 11:00:15 +05:30
project.add_maintainer(user)
2017-08-17 22:00:37 +05:30
end
2022-10-11 01:57:18 +05:30
it "escapes HTML in import errors", :skip_html_escaped_tags_check do
2017-08-17 22:00:37 +05:30
assign(:project, project)
render
expect(rendered).not_to have_link('Foo', href: "http://googl.com")
end
end
end