summaryrefslogtreecommitdiff
path: root/spec/features/markdown/math_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/markdown/math_spec.rb')
-rw-r--r--spec/features/markdown/math_spec.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/features/markdown/math_spec.rb b/spec/features/markdown/math_spec.rb
index 16ad0d456be..a5e56cb7628 100644
--- a/spec/features/markdown/math_spec.rb
+++ b/spec/features/markdown/math_spec.rb
@@ -1,9 +1,9 @@
-require 'spec_helper'
+require "spec_helper"
-describe 'Math rendering', :js do
+describe "Math rendering", :js do
let!(:project) { create(:project, :public) }
- it 'renders inline and display math correctly' do
+ it "renders inline and display math correctly" do
description = <<~MATH
This math is inline $`a^2+b^2=c^2`$.
@@ -17,11 +17,11 @@ describe 'Math rendering', :js do
visit project_issue_path(project, issue)
- expect(page).to have_selector('.katex .mord.mathdefault', text: 'b')
- expect(page).to have_selector('.katex-display .mord.mathdefault', text: 'b')
+ expect(page).to have_selector(".katex .mord.mathdefault", text: "b")
+ expect(page).to have_selector(".katex-display .mord.mathdefault", text: "b")
end
- it 'only renders non XSS links' do
+ it "only renders non XSS links" do
description = <<~MATH
This link is valid $`\\href{javascript:alert('xss');}{xss}`$.
@@ -32,7 +32,7 @@ describe 'Math rendering', :js do
visit project_issue_path(project, issue)
- expect(page).to have_selector('.katex-error', text: "\href{javascript:alert('xss');}{xss}")
- expect(page).to have_selector('.katex-html a', text: 'Gitlab')
+ expect(page).to have_selector(".katex-error", text: "\href{javascript:alert('xss');}{xss}")
+ expect(page).to have_selector(".katex-html a", text: "Gitlab")
end
end