DEV: improve spec to specify all code block formats

DEV: improve spec to specify all code block formats

Previously we only covered a few, this covers a few more formats.

diff --git a/spec/services/inline_uploads_spec.rb b/spec/services/inline_uploads_spec.rb
index 5efb98a..e340289 100644
--- a/spec/services/inline_uploads_spec.rb
+++ b/spec/services/inline_uploads_spec.rb
@@ -60,11 +60,21 @@ RSpec.describe InlineUploads do
       end
 
       it "should not correct code blocks" do
-        md = "`<a class=\"attachment\" href=\"#{upload2.url}\">In Code Block</a>`"
 
-        expect(InlineUploads.process(md)).to eq(md)
+        md = <<~MD
+          `<a class=\"attachment\" href=\"#{upload2.url}\">In Code Block</a>`
+
+                 <a class=\"attachment\" href=\"#{upload2.url}\">In Code Block</a>
 
-        md = "    <a class=\"attachment\" href=\"#{upload2.url}\">In Code Block</a>"
+          `‍``
+          <a class=\"attachment\" href=\"#{upload2.url}\">In Code Block</a>
+          `‍``
+          a [code]<a class=\"attachment\" href=\"#{upload2.url}\">In Code Block</a>[/code] b
+
+          [code]
+          <a class=\"attachment\" href=\"#{upload2.url}\">In Code Block</a>
+          [/code]
+        MD
 
         expect(InlineUploads.process(md)).to eq(md)
       end

GitHub sha: 739696fd

1 Like