mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Apply syntax_tree formatting to spec/*
This commit is contained in:
@@ -4,16 +4,12 @@ RSpec.describe PostReplyKey do
|
||||
describe "#reply_key" do
|
||||
it "should format the reply_key correctly" do
|
||||
hex = SecureRandom.hex
|
||||
post_reply_key = Fabricate(:post_reply_key,
|
||||
reply_key: hex
|
||||
)
|
||||
post_reply_key = Fabricate(:post_reply_key, reply_key: hex)
|
||||
|
||||
raw_key = PostReplyKey.where(id: post_reply_key.id)
|
||||
.pluck("reply_key::text")
|
||||
.first
|
||||
raw_key = PostReplyKey.where(id: post_reply_key.id).pluck("reply_key::text").first
|
||||
|
||||
expect(raw_key).to_not eq(hex)
|
||||
expect(raw_key.delete('-')).to eq(hex)
|
||||
expect(raw_key.delete("-")).to eq(hex)
|
||||
expect(PostReplyKey.find(post_reply_key.id).reply_key).to eq(hex)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user