correct specs

This commit is contained in:
Sam 2017-07-12 18:03:56 -04:00
parent c64aabc964
commit 2c6284ece3

View File

@ -414,12 +414,14 @@ describe Post do
end end
it "ignores pre" do it "ignores pre" do
post = Fabricate.build(:post, post_args.merge(raw: "<pre>@Jake</pre> @Finn")) # we need to force an inline
post = Fabricate.build(:post, post_args.merge(raw: "p <pre>@Jake</pre> @Finn"))
expect(post.raw_mentions).to eq(['finn']) expect(post.raw_mentions).to eq(['finn'])
end end
it "catches content between pre tags" do it "catches content between pre tags" do
post = Fabricate.build(:post, post_args.merge(raw: "<pre>hello</pre> @Finn <pre></pre>")) # per common mark we need to force an inline
post = Fabricate.build(:post, post_args.merge(raw: "a <pre>hello</pre> @Finn <pre></pre>"))
expect(post.raw_mentions).to eq(['finn']) expect(post.raw_mentions).to eq(['finn'])
end end
@ -429,7 +431,7 @@ describe Post do
end end
it "ignores quotes" do it "ignores quotes" do
post = Fabricate.build(:post, post_args.merge(raw: "[quote=\"Evil Trout\"]@Jake[/quote] @Finn")) post = Fabricate.build(:post, post_args.merge(raw: "[quote=\"Evil Trout\"]\n@Jake\n[/quote]\n@Finn"))
expect(post.raw_mentions).to eq(['finn']) expect(post.raw_mentions).to eq(['finn'])
end end