DEV: Apply syntax_tree formatting to spec/*

This commit is contained in:
David Taylor
2023-01-09 11:18:21 +00:00
parent 0cf6421716
commit cb932d6ee1
907 changed files with 58693 additions and 45909 deletions

View File

@ -1,17 +1,22 @@
# frozen_string_literal: true
RSpec.describe ClicksController do
let(:url) { "https://discourse.org/" }
let(:headers) { { REMOTE_ADDR: "192.168.0.1" } }
let(:post_with_url) { create_post(raw: "this is a post with a link #{url}") }
describe '#track' do
describe "#track" do
it "creates a TopicLinkClick" do
sign_in(Fabricate(:user))
expect {
post "/clicks/track", params: { url: url, post_id: post_with_url.id, topic_id: post_with_url.topic_id }, headers: headers
post "/clicks/track",
params: {
url: url,
post_id: post_with_url.id,
topic_id: post_with_url.topic_id,
},
headers: headers
}.to change { TopicLinkClick.count }.by(1)
end
end