Remove redundant include of CloudinaryHelper (#8136)
This commit is contained in:
parent
15d2dd0b3a
commit
25c1f9210f
3 changed files with 20 additions and 3 deletions
|
|
@ -1,6 +1,4 @@
|
|||
module ApplicationHelper
|
||||
include CloudinaryHelper
|
||||
|
||||
# rubocop:disable Performance/OpenStruct
|
||||
DELETED_USER = OpenStruct.new(
|
||||
id: nil,
|
||||
|
|
|
|||
|
|
@ -159,9 +159,15 @@ RSpec.describe ApplicationHelper, type: :helper do
|
|||
end
|
||||
|
||||
describe "#sanitize_and_decode" do
|
||||
it "Sanitize and decode string" do
|
||||
it "sanitize and decode string" do
|
||||
expect(helper.sanitize_and_decode("<script>alert('alert')</script>")).to eq("alert('alert')")
|
||||
expect(helper.sanitize_and_decode("< hello")).to eq("< hello")
|
||||
end
|
||||
end
|
||||
|
||||
describe "#cloudinary" do
|
||||
it "returns cloudinary-manipulated link" do
|
||||
expect(helper.cloudinary(Faker::Placeholdit.image)).to start_with("https://res.cloudinary.com")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -84,4 +84,17 @@ RSpec.describe "Using the editor", type: :system do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "using v2 editor", js: true do
|
||||
before { user.update(editor_version: "v2") }
|
||||
|
||||
it "fill out form with rich content and click publish" do
|
||||
visit "/new"
|
||||
fill_in "article-form-title", with: "This is a test"
|
||||
fill_in "tag-input", with: "What, Yo"
|
||||
fill_in "article_body_markdown", with: "Hello"
|
||||
find("button", text: /\APUBLISH\z/).click
|
||||
expect(page).to have_text("Hello")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue