DEV: Remove harded id when fabricating in tests (#18729) (#18730)

Hardcoding ids always lead to sadness for our test suite
This commit is contained in:
Alan Guo Xiang Tan 2022-10-25 06:33:36 +08:00 committed by GitHub
parent 6c97cc1834
commit 689ba22db0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -996,7 +996,7 @@ RSpec.describe TopicView do
subject(:topic_view) { described_class.new(topic, user) }
let(:topic) { Fabricate(:topic) }
let(:user) { Fabricate(:user, id: 1) }
let(:user) { Fabricate(:user) }
let(:category) { topic.category }
before do

View File

@ -107,7 +107,7 @@ describe PostSerializer do
end
context "with a hidden post with add_raw enabled" do
let(:user) { Fabricate(:user, id: -99999) }
let(:user) { Fabricate(:user) }
let(:raw) { "Raw contents of the post." }
context "with a public post" do