A platform for community discussion. Free, open, simple.
DEV: Fix failling test.
Bianca Nenciu4696be4c1935
diff --git a/spec/requests/clicks_controller_spec.rb b/spec/requests/clicks_controller_spec.rbindex 208be2edaf4..796f358b5de 100644--- a/spec/requests/clicks_controller_spec.rb+++ b/spec/requests/clicks_controller_spec.rb@@ -6,14 +6,14 @@ describe ClicksController dolet(:url) { "https://discourse.org/" }let(:headers) { { REMOTE_ADDR: "192.168.0.1" } }- let(:post) { create_post(raw: "this is a post with a link #{url}") }+ let(:post_with_url) { create_post(raw: "this is a post with a link #{url}") }context '#track' doit "creates a TopicLinkClick" dosign_in(Fabricate(:user))expect {- post "/clicks/track", params: { url: url, post_id: post.id, topic_id: post.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)endend