mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
PERF: Speed up the tests by pre-fabricating more things (#15318)
This commit is contained in:

committed by
GitHub

parent
6120dde65c
commit
102fa71ef3
@ -8,6 +8,7 @@ describe PostRevisor do
|
||||
fab!(:topic) { Fabricate(:topic) }
|
||||
fab!(:newuser) { Fabricate(:newuser, last_seen_at: Date.today) }
|
||||
fab!(:user) { Fabricate(:user) }
|
||||
fab!(:coding_horror) { Fabricate(:coding_horror) }
|
||||
fab!(:admin) { Fabricate(:admin) }
|
||||
fab!(:moderator) { Fabricate(:moderator) }
|
||||
let(:post_args) { { user: newuser, topic: topic } }
|
||||
@ -523,7 +524,7 @@ describe PostRevisor do
|
||||
end
|
||||
|
||||
describe 'rate limiter' do
|
||||
fab!(:changed_by) { Fabricate(:coding_horror) }
|
||||
fab!(:changed_by) { coding_horror }
|
||||
|
||||
before do
|
||||
RateLimiter.enable
|
||||
@ -618,7 +619,7 @@ describe PostRevisor do
|
||||
SiteSetting.editing_grace_period_max_diff = 1000
|
||||
end
|
||||
|
||||
fab!(:changed_by) { Fabricate(:coding_horror) }
|
||||
fab!(:changed_by) { coding_horror }
|
||||
let!(:result) { subject.revise!(changed_by, raw: "lets update the body. Здравствуйте") }
|
||||
|
||||
it 'correctly updates raw' do
|
||||
|
Reference in New Issue
Block a user