mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 23:42:59 +08:00
DEV: Remove harded id when fabricating in tests (#18729)
Hardcoding ids always lead to sadness for our test suite
This commit is contained in:
parent
589a249a65
commit
0ffd408674
|
@ -1001,7 +1001,7 @@ RSpec.describe TopicView do
|
||||||
subject(:topic_view) { described_class.new(topic, user) }
|
subject(:topic_view) { described_class.new(topic, user) }
|
||||||
|
|
||||||
let(:topic) { Fabricate(:topic) }
|
let(:topic) { Fabricate(:topic) }
|
||||||
let(:user) { Fabricate(:user, id: 1) }
|
let(:user) { Fabricate(:user) }
|
||||||
let(:category) { topic.category }
|
let(:category) { topic.category }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
|
|
|
@ -129,7 +129,7 @@ RSpec.describe PostSerializer do
|
||||||
end
|
end
|
||||||
|
|
||||||
context "with a hidden post with add_raw enabled" do
|
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." }
|
let(:raw) { "Raw contents of the post." }
|
||||||
|
|
||||||
context "with a public post" do
|
context "with a public post" do
|
||||||
|
|
Loading…
Reference in New Issue
Block a user